歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> CentOS v6.4 64位系統編譯linux3.0.8內核錯誤的解決

CentOS v6.4 64位系統編譯linux3.0.8內核錯誤的解決

日期:2017/3/3 13:01:00   编辑:Linux技術

一、錯誤現象

在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來進行安裝,安裝完成後,重新編譯,成功通過。

Copyright © Linux教程網 All Rights Reserved