opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc无法找到

1、环境变量设置错误 vim /etc/environment PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/FriendlyARM/toolschain/4.5.1/bin"
2、缺少32位的运行库 ia32-libs ,安装命令如下: apt-get install ia32-libs
3、缺少lsb-core运行库,安装命令如下: sudo apt-get install lsb-core
4、安装g+±multilib sudo apt-get install g+±multilib
我用的是第二种方法然后在arm-linux-gcc -v就成功了

ls /usr/local/lib/libsqlite3.* /usr/local/lib/libsqlite3.a /usr/local/lib/libsqlite3.so.0 /usr/local/lib/libsqlite3.la /usr/local/lib/libsqlite3.so.0.8.6 /usr/local/lib/libsqlite3.so ls /usr/local/include/sqlite3.h /usr/local/include/sqlite3.h arm-linux-gcc -L./lib-lsqlite3 -o sqlite sqlite.c /tmp/ccKtSnwq.o: In function `main': sqlite.c:(.text+0xf4): undefined reference to `sqlite3_open' sqlite.c:(.text+0x120): undefined reference to `sqlite3_errmsg' sqlite.c:(.text+0x140): undefined reference to `sqlite3_close' sqlite.c:(.text+0x170): undefined reference to `sqlite3_exec' sqlite.c:(.text+0x1b0): undefined reference to `sqlite3_free' sqlite.c:(.text+0x1d8): undefined reference to `sqlite3_exec' sqlite.c:(.text+0x218): undefined reference to `sqlite3_free' sqlite.c:(.text+0x240): undefined reference to `sqlite3_exec' sqlite.c:(.text+0x280): undefined reference to `sqlite3_free' sqlite.c:(.text+0x28c): undefined reference to `sqlite3_close' collect2: ld returned 1 exit status [root@localhost install]# arm-linux-gcc -o sqlite sqlite.c -L./usr/local/lib -lsqlite3 /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lsqlite3 collect2: ld returned 1 exit status [root@localhost install]# arm-linux-gcc -o sqlite sqlite.c -L./usr/local/lib -lsqlite3 -static /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lsqlite3 collect2: ld returned 1 exit status [root@localhost install]# chmod +x /usr/local/libsqlite3.so chmod: cannot access `/usr/local/libsqlite3.so': No such file or directory [root@localhost install]# chmod +x /usr/local/libsqlite3.so.0.8.6 chmod: cannot access `/usr/local/libsqlite3.so.0.8.6': No such file or directory [root@localhost install]# arm-linux-gcc -o sqlite sqlite.c -L./usr/local/lib -lsqlite3.so -static /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lsqlite3.so collect2: ld returned 1 exit status [root@localhost install]# arm-linux-gcc -o sqlite sqlite.c -L./usr/local/lib -lsqlite3.so /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lsqlite3.so collect2: ld returned 1 exit status
06-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值