编译内核遇到的问题汇总

 ubutnu12.04编译Android4.2

error while loading shared libraries: libz.so.1:
 ubutnu12.04编译Android4.2:error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory.

如题,ubuntu12.04-64位编译Android4.2时出现问题:error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory.

解决方法:很明显就是安装这个库所在包咯,可是我们怎么这知道 libz.so.1在哪个包呢?
我们使用命令: apt-file search 来查找,首先安装,按如下命令:
1 sudo apt-get install apt-file
安装完以后系统会提示你update,如果没有提示,在终端输入如下命令:
1 sudo apt-file update
apt-file 是用来查找某个命令或者某一个库所在的包的,具体用法如下:
01 dell@dell-OptiPlex-7010:~$ apt-file search libz.so.1
02 lib32z1: /usr/lib32/libz.so.1
03 lib32z1: /usr/lib32/libz.so.1.2.3.3
04 lib32z1-dev: /usr/lib32/libz.so
05 lsb-build-base3: /usr/lib/lsb3/libz.so
06 zlib1g: /lib/libz.so.1
07 zlib1g: /lib/libz.so.1.2.3.3
08 zlib1g-dbg: /usr/lib/debug/lib/libz.so.1.2.3.3
09 zlib1g-dbg: /usr/lib/debug/usr/lib32/libz.so.1.2.3.3
10 zlib1g-dev: /usr/lib/libz.so

使用apt-file search 查找你的库所在包就行了,右边的是匹配你的库,左边的是你查的库所在的包,所以最后安装对应的包就行了。
1 sudo apt-get install lib32z1

如果只为解决问题,只需上面这一条命令就ok了!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

make menuconfig


后,出现如下错误:


*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] 错误 1
make: *** [menuconfig] 错误 2


上述错误是说,执行make menuconfig 命令需要安装ncurses-dev

解决方案:

在命令行中输入:

sudo apt-get install libncurses5-dev

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~··

 gmake is GNU make, so Ubuntu use gmake as make.

 In order to solve the "gmake: command not found" problem, it is only to make a soft link with make. take the following command as a reference.

 ln -s /usr/bin/make /usr/bin/gmake




你可能感兴趣的:(编译内核遇到的问题汇总)