bash: ./arm-none-linux-gnueabi-gcc: No such file or directory

操作系统:Win10 64位

虚拟机:VMware® Workstation 14 Pro + Ubuntu18.04

arm交叉编译工具:arm-2009q3.tar.bz2

解压 arm-2009q3.tar.bz2 

tar xjvf arm-2009q3.tar.bz2 -C /home/imx6/share/

运行发现:

imx6@imx6-vm:~/share$ cd arm-2009q3/bin/
imx6@imx6-vm:~/share/arm-2009q3/bin$ ls
arm-none-linux-gnueabi-addr2line  arm-none-linux-gnueabi-gprof
arm-none-linux-gnueabi-ar         arm-none-linux-gnueabi-ld
arm-none-linux-gnueabi-as         arm-none-linux-gnueabi-nm
arm-none-linux-gnueabi-c++        arm-none-linux-gnueabi-objcopy
arm-none-linux-gnueabi-c++filt    arm-none-linux-gnueabi-objdump
arm-none-linux-gnueabi-cpp        arm-none-linux-gnueabi-ranlib
arm-none-linux-gnueabi-g++        arm-none-linux-gnueabi-readelf
arm-none-linux-gnueabi-gcc        arm-none-linux-gnueabi-size
arm-none-linux-gnueabi-gcc-4.4.1  arm-none-linux-gnueabi-sprite
arm-none-linux-gnueabi-gcov       arm-none-linux-gnueabi-strings
arm-none-linux-gnueabi-gdb        arm-none-linux-gnueabi-strip
arm-none-linux-gnueabi-gdbtui
imx6@imx6-vm:~/share/arm-2009q3/bin$ ./arm-none-linux-gnueabi-gcc -v
bash: ./arm-none-linux-gnueabi-gcc: No such file or directory

 

imx6@imx6-vm:~/share/arm-2009q3/bin$ file arm-none-linux-gnueabi-gcc
arm-none-linux-gnueabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 
dynamically linked, interpreter /lib/ld-, for GNU/Linux 2.2.5, stripped
imx6@imx6-vm:~/share/arm-2009q3/bin$ 

 

开始以为是权限问题,后来,在网上查了一下,原来是Ubuntu18.04为64位的,需要安装32位的运行库,才能运行。

解决方法:

sudo apt install lib32stdc++6

安装后,再运行,可以了

imx6@imx6-vm:~/share/arm-2009q3/bin$ ./arm-none-linux-gnueabi-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/julian/2009q3-respin-linux-lite/src/gcc-4.4/configure --
build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-
threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --enable-extra-
sgxxlite-multilibs --with-arch=armv5te --with-gnu-as --with-gnu-ld --with-specs='%{funwind-
tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} %{O2:%{!fno-
remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-
statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --disable-lto 
--enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2009q3-67' 
--with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --
prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --
with-build-sysroot=/scratch/julian/2009q3-respin-linux-lite/install/arm-none-linux-
gnueabi/libc --with-gmp=/scratch/julian/2009q3-respin-linux-lite/obj/host-libs-2009q3-67-
arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/julian/2009q3-respin-
linux-lite/obj/host-libs-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-
ppl=/scratch/julian/2009q3-respin-linux-lite/obj/host-libs-2009q3-67-arm-none-linux-
gnueabi-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-
Bdynamic -lm' --with-cloog=/scratch/julian/2009q3-respin-linux-lite/obj/host-libs-2009q3-
67-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-
directories --with-build-time-tools=/scratch/julian/2009q3-respin-linux-lite/install/arm-
none-linux-gnueabi/bin --with-build-time-tools=/scratch/julian/2009q3-respin-linux-
lite/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) 

使用ubuntu18.04,虽然较新,感觉还不错。

 

 

你可能感兴趣的:(嵌入式Linux)