CentOS v6.4 64位系统编译linux3.0.8内核错误的解决

一、错误现象

在CentOS v6.4 64位系统,使用Tiny210的开发配套光盘提供的arm-linux-gcc-4.5.1-v6-vfp-20120301.tgz编译linux-3.0.8-20130327.tgz内核,会有以下错误:

/opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object

 

二、解决办法

使用命令ldd /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/as 可以看到这里的as依赖于的静态库libz.so.1缺少,用find命令查找,只发现在lib64目录中有该文件,lib目录没有。

在联网的前提下,使用命令yum whatprovides */libz.so.1来查找那些安装包提供了该文件,结果如下:

[root@ken ~]# yum whatprovides */libz.so.1
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: ftp.twaren.net
 * extras: ftp.tc.edu.tw
 * updates: ftp.nsysu.edu.tw
zlib-1.2.3-29.el6.x86_64 : The zlib compression and decompression library
Repo        : base
Matched from:
Filename    : /lib64/libz.so.1
 
zlib-1.2.3-29.el6.i686 : The zlib compression and decompression library
Repo        : base
Matched from:
Filename    : /lib/libz.so.1
 
zlib-1.2.3-29.el6.x86_64 : The zlib compression and decompression library
Repo        : installed
Matched from:
Filename    : /lib64/libz.so.1
 
zlib-1.2.3-29.el6.i686 : The zlib compression and decompression library
Repo        : installed
Matched from:
Filename    : /lib/libz.so.1

 

可见/lib/libz.so.1是zlib-1.2.3-2.9.e16.i686提供的,因此使用yum install  zlib.i686来进行安装,安装完成后,重新编译,成功通过。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值