一、錯誤現象
在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
在聯網的前提下,使用命令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來進行安裝,安裝完成後,重新編譯,成功通過。