Linux Mint Tutorial

Source: Internet
Author: User
Tags linux mint

Installing arm-linux-gcc-4.4.3.tar.gz


1. Extracting files

Unzip the tar zxvf arm-linux-gcc-4.4.3.tar.gz-c/

sudo tar zxvf arm-linux-gcc-4.4.3.tar.gz-c/
Execute the command to extract the ARM-LINUX-GCC to the/opt/friendlyarm/toolschain/4.4.3 directory

2. Create a Directory

sudo mkdir/usr/local/arm
3. Copying files

sudo cp-r/opt/friendlyarm/toolschain/4.4.3/usr/local/arm
Execute the command to copy the 4.4.3 folder to the directory/usr/local/arm directory 4. Add environment variable

Method One: Modify the/ETC/BASH.BASHRC file (this file applies only to the current user)
sudo gedit/etc/bash.bashrc
At the end of the add export path= $PATH:/opt/friendlyarm/toolschain/4.4.3/bin (Path) (Note that there are no spaces on the equals sign)

Method Two: Modify the/etc/profile file (this file belongs to the system level environment variable, the thing that is set inside is applicable to all users)
sudo gedit/etc/profile
Add the path setting, at the end, as follows:
Export path= $PATH:/usr/local/arm/4.4.3/bin (Path) (Note that there are no spaces on the equals sign)

Method Three: Modify the/etc/environment file (Recommended)
sudo gedit/etc/environment
The original file should be
Path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
Change it to
Path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/arm/4.4.3/bin"

About environment variable issues:

What are environment variables? For example, path, when the system is required to run a program without telling it the full path of the program, in addition to the current directory under the search for this program, but also to the path specified in the paths to find. The user can run the process better by setting the environment variables.
If the above does not add environment variables, to run ARM-LINUX-GCC this program, each time you have to write the full path of ARM-LINUX-GCC. /USR/LOCAL/ARM/4.4.3/BINARM-LINUX-GCC file name-o output file name
This is very troublesome, so add to path and let the computer know where the program is.

5. Registering Environment variables

Immediately make the new environment variable effective, do not restart the computer, corresponding to step 4 there are 3 ways
Method One: SOURCE/ROOT/.BASHRC
Or./ETC/BASH.BASHRC

Method Two: Source/etc/profile
Method Three: Immediate effect

6. Check if the path is joined to path

Echo $PATH
Display Content/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/arm/4.4.3/bin Indicates that the path to the cross-compiler has been added. At this point, the cross-compilation environment is installed.

7. Test if the installation is successful ARM-LINUX-GCC-V view version number

Linux Mint Tutorial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.