ARM-linux-gcc cross-compilation tool prompts arm-linux-gcc can not find

Publisher:Meiren520Latest update time:2016-08-13 Source: eefocusKeywords:ARM-linux-gcc Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
         After installing arm-linux-gcc in Ubuntu 12.04, I found a message "arm-linux-gcc can not find" when compiling the Linux kernel. I searched for relevant online information and found the answer.

        1: 1: Normally, unzip and install the cross-tool in the user directory.

                  2: Use sudo /etc/profile to change the corresponding environment variables. (For more information, see the cross-tool installation in the OK6410Llinux user manual)

                  3: source /etc/profile to make the modified file take effect

                  4: Check whether the cross-tool is effective: arm-linux-gcc -V

    

  The above prompts you to install the cross tool chain version information, but when you compile the kernel, the system will prompt an error that some files cannot be executed, so I added sudoo and tried to compile it through sudoo permissions. The structure is not good and it prompts arm-linux-gcc can not find,.... What's the matter? What's the matter? ? ? ? ?

 

       The solution is as follows:

               A: sudo -s command, this is the command that Ubuntu switches to root privileges

                B: vi /etc/profile command, you will find that this is not the file modified in the previous step? Yes, it is the file you modified and saved with sudo vi /etc/profile under user permissions. We do not need to modify it again here. The key is in the third point below

                C: source /etc/profile。

      D: Check whether the cross-tool is effective: arm-linux-gcc -v

     E: Compile your file and find that the tool is easy to use and does not prompt errors

 Summary: The reason is that we need the super privilege ROOT to compile files. The cross-compilation tool installed under user privileges cannot be found when compiling files with super privileges. It is equivalent to you being an arms supplier and having many guns, but sorry, only the police have the privilege to use the guns and ammunition. Ordinary users cannot use them without privileges. What should you do? You have to tell the police how to use these weapons through the "instruction manual". sudo -S switches to ROOT privileges, and source /etc/profile under root privileges to register the relevant cross-tool information for root.

Keywords:ARM-linux-gcc Reference address:ARM-linux-gcc cross-compilation tool prompts arm-linux-gcc can not find

Previous article:How to read and write Flash in ARM
Next article:Compilation problems encountered when cross-compiling the json-c-0.9 library under arm-linux

Recommended ReadingLatest update time:2024-11-16 17:56

A bug about arm-linux-gcc using the static keyword
# arm-linux-gcc -v xxx 4.3.3 /* main.c */ static unsigned *p = (unsigned*) (0x0000); /* When the external initialization is 0, everything is OK int main (void) { xxxxx; ...... ; } # arm-linux-gcc -O0 main.c -g -c -Wall When we do not add optimization, the file b
[Microcontroller]
arm-linux-gcc make menuconfig error when porting u-boot2015.04
root@cnicfhnui-VirtualBox:/S3C2440/u-boot-2015.04# make menuconfig   HOSTCC  scripts/kconfig/mconf.o In file included from scripts/kconfig/mconf.c:23:0: scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: no such file or directory Compilation aborted. make : *** Error 1 make: *** Error 2  
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components
Guess you like

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号