Method 1
We all know Ubuntu There is a special tool for installing software apt, We can use it for automatic installation arm-linux-gcc.
This method installs the latest version of , But this method requires ***, otherwise 99% Will fail , That's why most of the Internet is installed in compressed packages :
First Ctrl+Alt+T Pop up terminal , Use the following command to arm-linux-gcc Installation :

sudo apt-get install gcc-arm-linux-gnueabihf

Use the following command to arm-linux-g++ Installation :

sudo apt-get install g++-arm-linux-gnueabihf

If you want to uninstall, use the following command to remove ,arm-linux-gcc The uninstall :

sudo apt-get remove gcc-arm-linux-gnueabihf

arm-linux-g++ The uninstall :

sudo apt-get remove g++-arm-linux-gnueabihf

Method 2
arm-linux-gcc3.4.5 arm-linux-gcc4.3.2 Version download
link :
Extraction code :krn5
install 64 Bit cross compiler tool , First, download the installation package according to the download address provided above :arm-linux-gcc-3.4.5-glibc-2.3.6.tar.bz2
1. First, move the downloaded installation package to the root directory tmp Directory (/tmp)
2. Use tar Command to unzip the installation package to the current directory , That is to say Terminal Enter the following command :( Ahead sudo Said the use of root Permission to execute the command )

sudo tar -xjvf /tmp/arm-linux-gcc-3.4.5-glibc-2.3.6.tar.bz2

3. After decompression , And then (/usr/local) Create a new directory in arm, That is to say Terminal Enter the following command :

sudo mkdir /usr/local/arm

4. establish arm After the directory succeeds , It needs to be given full authority , That is to say Terminal Enter the following command :

sudo chmod 777 /usr/local/arm

5. Find the whole... In the unzipped directory arm-linux-gcc-3.4.5-glibc-2.3.6 Copy the directory to the one you just created arm Directory , The order is as follows :

sudo cp -r gcc-3.4.5-glibc-2.3.6 /usr/local/arm

6. open (/etc/profile) Configure environment variables and library variables , The goal is to use the cross compiler anywhere in the future , The order is as follows :

sudo vi /etc/profile

7. use vi perhaps vim After opening , Add two lines at the end of the file , And enter the following code : The first line is to add an environment variable for the executing program , The second line is the path to the library file

export PATH=$PATH:/usr/local/arm/gcc-3.4.5-glibc-2.3.6/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/arm/gcc-3.4.5-glibc-2.3.6/lib

8. Use source Command to reload the configuration file

source /etc/profile

9. Verify successful installation , stay Terminal Enter the following command to output version information :

 arm-linux-gcc -v

10. If you have the following error, please refer to the solution :
Report errors :bash: /usr/local/arm/4.2.2-eabi/usr/bin/arm-linux-gcc-4.2.2: No such file or directory

sudo apt-get install libc6-i386

The library includes ia32-libs, lib32z1, lib32ncurses5 Wait, depend on . This error report is mainly due to 64 Running in a machine 32 Bit software .
Report errors
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarly unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is an other process using it?
Delete lock file , All right

sudo rm /var/lib/dpkg/lock-frontend       
sudo rm /var/lib/dpkg/lock

In this paper, the reference If there is any infringement , Please contact to delete !