gcc-arm-linux-gnueabi命令没有找到

时间:2022-01-01 01:50:31

I am trying to install the gnu arm toolchain for ubuntu. I first downloaded the tar from CodeSourcery. However when I go into the bin folder, I cannot run any of the binaries. I have tried with ./ and without and putting it in the PATH and it keeps telling me "Command not Found" yet the file is there in the folder right in front of me. Then I tried sudo apt-get install gcc-arm-linux-gnueabi except after it says it has installed successfully, I cannot find it with whereis gcc-arm-linux-gnueabi. Can anyone help?

我正在为ubuntu安装gnu arm工具链。我首先从CodeSourcery下载了焦油。但是,当我进入bin文件夹时,我不能运行任何二进制文件。我已经试过了。/没有,把它放在路径上,它一直告诉我“命令没有找到”,但是文件就在我面前的文件夹里。然后我尝试了sudo apt-get安装gcc-arm-linux-gnueabi,但它说已经成功安装之后,我找不到gccl -arm-linux-gnueabi。谁能帮忙吗?

10 个解决方案

#1


19  

Are you compiling on a 64-bit OS? Try:

您是在64位操作系统上编译吗?试一试:

sudo apt-get install ia32-libs

I had the same problem when trying to compile the Raspberry Pi kernel. I was cross-compiling on Ubuntu 12.04 64-bit and the toolchain requires ia32-libs to work on on a 64-bit system.

我在尝试编译树莓派果仁时遇到了同样的问题。我在Ubuntu 12.04 64位上交叉编译,并且工具链需要在64位系统上使用ia32-libs。

See http://hertaville.com/2012/09/28/development-environment-raspberry-pi-cross-compiler/

参见http://hertaville.com/2012/09/28/development-environment-raspberry-pi-cross-compiler/

#2


11  

CodeSourcery convention is to use prefix arm-none-linux-gnueabi- for all executables, not gcc-arm-linux-gnueabi that you mention. So, standard name for CodeSourcery gcc would be arm-none-linux-gnueabi-gcc.

CodeSourcery约定是对所有可执行文件使用arm-none-linux-gnueabi前缀,而不是您提到的gcc-arm- arm-linux-gnueabi。因此,CodeSourcery gcc的标准名称是arm-none-linux-gnueabi-gcc。

After you have installed CodeSourcery G++, you need to add CodeSourcery directory into your PATH.

安装CodeSourcery g++之后,需要将CodeSourcery目录添加到路径中。

Typically, I prefer to install CodeSourcery into directory like /opt/arm-2010q1 or something like that. If you don't know where you have installed it, you can find it using locate arm-none-linux-gnueabi-gcc, however you may need to force to update your locate db using sudo updatedb before locate will work properly.

通常,我更喜欢将CodeSourcery安装到/opt/arm-2010q1之类的目录中。如果您不知道它安装在哪里,可以使用locate arm-none-linux-gnueabi-gcc找到它,但是您可能需要在locate正常工作之前使用sudo updatedb强制更新您的locate db。

After you have identified where your CodeSourcery is installed, add it your PATH by editing ~/.bashrc like this:

确定了CodeSourcery的安装位置后,通过编辑~/添加路径。bashrc是这样的:(

PATH=/opt/arm-2010q1/bin:$PATH

Also, it is customary and very convenient to define

而且,这是习惯的,非常方便的定义。

CROSS_COMPILE=arm-none-linux-gnueabi-

in your .bashrc, because with CROSS_COMPILE defined, most tools will automatically use proper compiler for ARM compilation without you doing anything.

在您的.bashrc中,由于使用CROSS_COMPILE定义,大多数工具将自动使用适当的编译器来进行ARM编译,而不需要您做任何事情。

#3


10  

fixed, using:

固定的,使用:

sudo apt-get install gcc-arm*

#4


6  

if you are on 64 bit os then you need to install this additional libraries.

如果您使用64位操作系统,那么您需要安装这个额外的库。

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0

#5


5  

got the same error when trying to cross compile the raspberry pi kernel on ubunto 14.04.03 64bit under VM. the solution was found here:

在尝试交叉编译ubunto的树莓pi内核时,在VM下得到了相同的错误。解决方法如下:

-Install packages used for cross compiling on the Ubuntu box.

-安装用于在Ubuntu框上进行交叉编译的软件包。

sudo apt-get install gcc-arm-linux-gnueabi make git-core ncurses-dev

-Download the toolchain

下载的工具链

cd ~
git clone https://github.com/raspberrypi/tools

-Add the toolchain to your path

-将工具链添加到路径中

PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

notice the x64 version in the path command

注意path命令中的x64版本

#6


4  

I was also facing the same issue and resolved it after installing the following dependency:

我也遇到了同样的问题,在安装了以下依赖项后解决了:

sudo apt-get install lib32z1-dev

#7


3  

If you are on a 64bit build of ubuntu or debian (see e.g. 'cat /proc/version') you should simply use the 64bit cross compilers, if you cloned

如果您正在使用64位ubuntu或debian(参见“cat /proc/version”)如果您进行了克隆,那么只需使用64位的交叉编译器

git clone https://github.com/raspberrypi/tools

then the 64bit tools are in

然后是64位工具

tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64

use that directory for the gcc-toolchain. A useful tutorial for compiling that I followed is available here Building and compiling Raspberry PI Kernel (use the -x64 path from above as ${CCPREFIX})

对gcc-toolchain使用该目录。这里有一个有用的编译教程,可以在这里编译和编译树莓PI内核(使用从上面作为${CCPREFIX}的-x64路径)

#8


2  

Its a bit counter-intuitive. The toolchain is called gcc-arm-linux-gnueabi. To invoke the tools execute the following: arm-linux-gnueabi-xxx

它有点反直觉的。这个工具链叫做gcc-arm-linux-gnueabi。要调用这些工具,请执行以下操作:arm-linux-gnueabi-xxx

where xxx is gcc or ar or ld, etc

xxx是gcc或ar或ld等

#9


1  

try the following command:

试试下面的命令:

which gcc-arm-linux-gnueabi

Its very likely the command is installed in /usr/bin.

该命令很可能安装在/usr/ bin中。

#10


1  

You have installed a toolchain which was compiled for i686 on a box which is running an x86_64 userland.

您已经安装了一个工具链,该工具链在一个运行x86_64 userland的盒子上编译为i686。

Use an i686 VM.

使用一个i686 VM。

#1


19  

Are you compiling on a 64-bit OS? Try:

您是在64位操作系统上编译吗?试一试:

sudo apt-get install ia32-libs

I had the same problem when trying to compile the Raspberry Pi kernel. I was cross-compiling on Ubuntu 12.04 64-bit and the toolchain requires ia32-libs to work on on a 64-bit system.

我在尝试编译树莓派果仁时遇到了同样的问题。我在Ubuntu 12.04 64位上交叉编译,并且工具链需要在64位系统上使用ia32-libs。

See http://hertaville.com/2012/09/28/development-environment-raspberry-pi-cross-compiler/

参见http://hertaville.com/2012/09/28/development-environment-raspberry-pi-cross-compiler/

#2


11  

CodeSourcery convention is to use prefix arm-none-linux-gnueabi- for all executables, not gcc-arm-linux-gnueabi that you mention. So, standard name for CodeSourcery gcc would be arm-none-linux-gnueabi-gcc.

CodeSourcery约定是对所有可执行文件使用arm-none-linux-gnueabi前缀,而不是您提到的gcc-arm- arm-linux-gnueabi。因此,CodeSourcery gcc的标准名称是arm-none-linux-gnueabi-gcc。

After you have installed CodeSourcery G++, you need to add CodeSourcery directory into your PATH.

安装CodeSourcery g++之后,需要将CodeSourcery目录添加到路径中。

Typically, I prefer to install CodeSourcery into directory like /opt/arm-2010q1 or something like that. If you don't know where you have installed it, you can find it using locate arm-none-linux-gnueabi-gcc, however you may need to force to update your locate db using sudo updatedb before locate will work properly.

通常,我更喜欢将CodeSourcery安装到/opt/arm-2010q1之类的目录中。如果您不知道它安装在哪里,可以使用locate arm-none-linux-gnueabi-gcc找到它,但是您可能需要在locate正常工作之前使用sudo updatedb强制更新您的locate db。

After you have identified where your CodeSourcery is installed, add it your PATH by editing ~/.bashrc like this:

确定了CodeSourcery的安装位置后,通过编辑~/添加路径。bashrc是这样的:(

PATH=/opt/arm-2010q1/bin:$PATH

Also, it is customary and very convenient to define

而且,这是习惯的,非常方便的定义。

CROSS_COMPILE=arm-none-linux-gnueabi-

in your .bashrc, because with CROSS_COMPILE defined, most tools will automatically use proper compiler for ARM compilation without you doing anything.

在您的.bashrc中,由于使用CROSS_COMPILE定义,大多数工具将自动使用适当的编译器来进行ARM编译,而不需要您做任何事情。

#3


10  

fixed, using:

固定的,使用:

sudo apt-get install gcc-arm*

#4


6  

if you are on 64 bit os then you need to install this additional libraries.

如果您使用64位操作系统,那么您需要安装这个额外的库。

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0

#5


5  

got the same error when trying to cross compile the raspberry pi kernel on ubunto 14.04.03 64bit under VM. the solution was found here:

在尝试交叉编译ubunto的树莓pi内核时,在VM下得到了相同的错误。解决方法如下:

-Install packages used for cross compiling on the Ubuntu box.

-安装用于在Ubuntu框上进行交叉编译的软件包。

sudo apt-get install gcc-arm-linux-gnueabi make git-core ncurses-dev

-Download the toolchain

下载的工具链

cd ~
git clone https://github.com/raspberrypi/tools

-Add the toolchain to your path

-将工具链添加到路径中

PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

notice the x64 version in the path command

注意path命令中的x64版本

#6


4  

I was also facing the same issue and resolved it after installing the following dependency:

我也遇到了同样的问题,在安装了以下依赖项后解决了:

sudo apt-get install lib32z1-dev

#7


3  

If you are on a 64bit build of ubuntu or debian (see e.g. 'cat /proc/version') you should simply use the 64bit cross compilers, if you cloned

如果您正在使用64位ubuntu或debian(参见“cat /proc/version”)如果您进行了克隆,那么只需使用64位的交叉编译器

git clone https://github.com/raspberrypi/tools

then the 64bit tools are in

然后是64位工具

tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64

use that directory for the gcc-toolchain. A useful tutorial for compiling that I followed is available here Building and compiling Raspberry PI Kernel (use the -x64 path from above as ${CCPREFIX})

对gcc-toolchain使用该目录。这里有一个有用的编译教程,可以在这里编译和编译树莓PI内核(使用从上面作为${CCPREFIX}的-x64路径)

#8


2  

Its a bit counter-intuitive. The toolchain is called gcc-arm-linux-gnueabi. To invoke the tools execute the following: arm-linux-gnueabi-xxx

它有点反直觉的。这个工具链叫做gcc-arm-linux-gnueabi。要调用这些工具,请执行以下操作:arm-linux-gnueabi-xxx

where xxx is gcc or ar or ld, etc

xxx是gcc或ar或ld等

#9


1  

try the following command:

试试下面的命令:

which gcc-arm-linux-gnueabi

Its very likely the command is installed in /usr/bin.

该命令很可能安装在/usr/ bin中。

#10


1  

You have installed a toolchain which was compiled for i686 on a box which is running an x86_64 userland.

您已经安装了一个工具链,该工具链在一个运行x86_64 userland的盒子上编译为i686。

Use an i686 VM.

使用一个i686 VM。