当前位置: 技术问答>linux和unix
求教:安装zlib报错
来源: 互联网 发布时间:2016-10-08
本文导语: 运行 tar zxvf zlib-1.2.3.tar.gz 将其解压后,设置环境变量: [root@localhost zlib-1.2.3]# export PATH=/usr/local/arm/2.95.3/bin:$PATH [root@localhost zlib-1.2.3]# export LD_LIBRARY_PATH=/usr/local/arm/2.95.3/arm-linux/lib:$LD_LIBRARY_PATH [root@localhost zlib-1....
运行
tar zxvf zlib-1.2.3.tar.gz
将其解压后,设置环境变量:
[root@localhost zlib-1.2.3]# export PATH=/usr/local/arm/2.95.3/bin:$PATH
[root@localhost zlib-1.2.3]# export LD_LIBRARY_PATH=/usr/local/arm/2.95.3/arm-linux/lib:$LD_LIBRARY_PATH
[root@localhost zlib-1.2.3]# export CC=/usr/local/arm/2.95.3/bin/arm-linux-gcc
之后运行configure报错:
[root@localhost zlib-1.2.3]# ./configure -shared
/bin/sh: error while loading shared libraries: /usr/local/arm/2.95.3/arm-linux/lib/libdl.so.2: ELF file OS ABI invalid
想查看libdl.so.2文件是否存在,也报错:
[root@localhost lib]# pwd
/usr/local/arm/2.95.3/arm-linux/lib
[root@localhost lib]# ls -l
ls: error while loading shared libraries: /usr/local/arm/2.95.3/arm-linux/lib/libc.so.6: ELF file OS ABI invalid
[root@localhost lib]# ls
ls: error while loading shared libraries: /usr/local/arm/2.95.3/arm-linux/lib/libc.so.6: ELF file OS ABI invalid
[root@localhost lib]#
这些都是什么原因,求指点!
tar zxvf zlib-1.2.3.tar.gz
将其解压后,设置环境变量:
[root@localhost zlib-1.2.3]# export PATH=/usr/local/arm/2.95.3/bin:$PATH
[root@localhost zlib-1.2.3]# export LD_LIBRARY_PATH=/usr/local/arm/2.95.3/arm-linux/lib:$LD_LIBRARY_PATH
[root@localhost zlib-1.2.3]# export CC=/usr/local/arm/2.95.3/bin/arm-linux-gcc
之后运行configure报错:
[root@localhost zlib-1.2.3]# ./configure -shared
/bin/sh: error while loading shared libraries: /usr/local/arm/2.95.3/arm-linux/lib/libdl.so.2: ELF file OS ABI invalid
想查看libdl.so.2文件是否存在,也报错:
[root@localhost lib]# pwd
/usr/local/arm/2.95.3/arm-linux/lib
[root@localhost lib]# ls -l
ls: error while loading shared libraries: /usr/local/arm/2.95.3/arm-linux/lib/libc.so.6: ELF file OS ABI invalid
[root@localhost lib]# ls
ls: error while loading shared libraries: /usr/local/arm/2.95.3/arm-linux/lib/libc.so.6: ELF file OS ABI invalid
[root@localhost lib]#
这些都是什么原因,求指点!
|
交叉编译执行configure 的时候要加上--host 和 --target选项。