嵌入式爱好者

查看: 19823|回复: 1

[Ubuntu] MacBook下虚拟Ubuntu中交叉编译器出现No such file or directory的问题解决

[复制链接]

2

主题

11

帖子

27

积分

i.MX6UL通行证i.MX6Q通行证AM335x通行证

扫一扫,手机访问本帖
发表于 2016-5-19 15:51:23 | 显示全部楼层 |阅读模式
我是在MckBook下虚拟的Ubuntu,在根据教程中安装交叉编译器且添加环境变量后,查询该交叉编译器会出现No such file or directory的问题,于是乎小爷就各种百度,结果百度婊说要安装ia32-libs,小爷满怀信心的输入sudo apt-get install ia32-libs后几个大大Error和Unable让咱内心有千万只草泥马奔腾而过,不过没事,咱接着搓百度婊,有个帖子吸引了小爷的注意力http://www.tuicool.com/articles/6ziE3e6,于是小爷就跟抄心经一般虔诚的敲入指令:1 sudo apt-get install libc6:i386 2 sudo -i 3 cd /etc/apt/sources.list.d 4 echo "deb http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list 5 apt-get update 6 apt-get install ia32-libs 7 rm /ia32-libs-raring.list 8 apt-get update 9 exit10 sudo apt-get install gcc-multilib
再次试一下 arm-fsl-linux-gnueabi-gcc -v
没错,终于出现了,哈哈:
Using built-in specs.
COLLECT_GCC=arm-fsl-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../libexec/gcc/arm-fsl-linux-gnueabi/4.6.2/lto-wrapper
Target: arm-fsl-linux-gnueabi
Configured with: /work/build/.build/src/gcc-linaro-4.6-2011.06-0/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-fsl-linux-gnueabi --prefix=/work/fsl-linaro-toolchain-2.13 --with-sysroot=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --enable-languages=c,c++ --with-pkgversion='Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpfr=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpc=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-ppl=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-cloog=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-libelf=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -L/work/build/.build/arm-fsl-linux-gnueabi/build/static/lib -lpwl' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-multilib --with-local-prefix=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --disable-nls --enable-c99 --enable-long-long --with-system-zlib
Thread model: posix
gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20)



回复

使用道具 举报

2

主题

11

帖子

27

积分

i.MX6UL通行证i.MX6Q通行证AM335x通行证

 楼主| 发表于 2016-5-19 16:19:27 | 显示全部楼层
当编译出现:
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../libexec/gcc/arm-fsl-linux-gnueabi/4.6.2/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
请安装 sudo apt-get install lib32z1
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-11-22 04:33

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表