1. Rebooting can fix a lot of things
Why do you want to write restart at the top? Because I installed arm-linux-gcc all morning today, but there have been problems with the environment variables. After searching a lot of blogs, I accidentally saw the word restart. I tried it and posted it successfully...
2. File download
3. Unzip
tar zxvf arm-linux-gcc-4.4.3.tar.gz
4. Enter the opt folder
cd opt/FriendlyARM/
5. Copy the toolschain to the system disk
sudo cp -rv toolschain/ /usr/local/
6. Add environment variables
cd ~
# 进入profile文件
vim .profile
# 在最后一行添加
export PATH=$PATH:/usr/local/toolschain/4.4.3/bin
# 保存退出后, 更新(可能需要重启)
source .profile
7. Check the effect
echo $PATH
If /usr/local/toolschain/4.4.3/bin appears, it means the installation is correct
arm-linux-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /opt/FriendlyARM/mini2440/build-toolschain/working/src/gcc-4.4.3/configure --build=i386-build_redhat-linux-gnu --host=i386-build_redhat-linux-gnu --target=arm-none-linux-gnueabi --prefix=/opt/FriendlyARM/toolschain/4.4.3 --with-sysroot=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi//sys-root --enable-languages=c,c++ --disable-multilib --with-arch=armv4t --with-cpu=arm920t --with-tune=arm920t --with-float=soft --with-pkgversion=ctng-1.6.1 --disable-sjlj-exceptions --enable-__cxa_atexit --with-gmp=/opt/FriendlyARM/toolschain/4.4.3 --with-mpfr=/opt/FriendlyARM/toolschain/4.4.3 --with-ppl=/opt/FriendlyARM/toolschain/4.4.3 --with-cloog=/opt/FriendlyARM/toolschain/4.4.3 --with-mpc=/opt/FriendlyARM/toolschain/4.4.3 --with-local-prefix=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi//sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace
Thread model: posix
gcc version 4.4.3 (ctng-1.6.1)