/libexpat.so: could not read symbols: File in wrong format
2012-09-27 12:06
435 查看
我在编译安装subversion时遇到这个问题
编译apache或者apache出品的log4cxx等软件时,有可能报"/usr/lib/libexpat.so: could not read symbols: File in wrong format"这个错误
出现这个问题,主要原因是libexpat的兼容性,特别对是64bit服务器的兼容性。现在新的服务器基本都采用64位了,但是默认的/usr/lib/库是32位的,64位的库默认在/usr/lib64/目录下,所以编译64位软件会遇到不少问题。
下面介绍一些解决思路:
陈运文
1)最直接的方法:
cp /usr/lib64/libexpat.* /usr/lib/
(将/usr/lib64/目录下的 libexpat.a、libexpat.la libexpat.so 文件拷贝到/usr/lib/目录)
cp覆盖以后,make就可以了
2)configure里手工指定库文件路径
./configure
LDFLAGS="-L/usr/lib64 -L/lib64" --prefix=/usr/local/apache --enable-so
--enable-expires --enable-rewrite --enable-headers --enable-deflate
--enable-dav --enable-maintainer-mode
3)另一种设置configure的办法是,将configure更改为:
./configure –enable-lib64 -libdir=/usr/lib64 –enable-ssl –with-ssl=/usr/local/ssl –enable-module=so –prefix=/usr/local/apache
4)方法四:编译时增加编译参数--with-expat=builtin
之前介绍了,由于64位服务器下编译脚本在定位系统 expat支持时有些问题。使用自带的expat来编译,也可以解决这个问题了。方法如下:
# ./configure --prefix=/usr/local/apache2 --enable-modules=so--enable-rewrite --with-expat=builtin
编译apache或者apache出品的log4cxx等软件时,有可能报"/usr/lib/libexpat.so: could not read symbols: File in wrong format"这个错误
出现这个问题,主要原因是libexpat的兼容性,特别对是64bit服务器的兼容性。现在新的服务器基本都采用64位了,但是默认的/usr/lib/库是32位的,64位的库默认在/usr/lib64/目录下,所以编译64位软件会遇到不少问题。
下面介绍一些解决思路:
陈运文
1)最直接的方法:
cp /usr/lib64/libexpat.* /usr/lib/
(将/usr/lib64/目录下的 libexpat.a、libexpat.la libexpat.so 文件拷贝到/usr/lib/目录)
cp覆盖以后,make就可以了
2)configure里手工指定库文件路径
./configure
LDFLAGS="-L/usr/lib64 -L/lib64" --prefix=/usr/local/apache --enable-so
--enable-expires --enable-rewrite --enable-headers --enable-deflate
--enable-dav --enable-maintainer-mode
3)另一种设置configure的办法是,将configure更改为:
./configure –enable-lib64 -libdir=/usr/lib64 –enable-ssl –with-ssl=/usr/local/ssl –enable-module=so –prefix=/usr/local/apache
4)方法四:编译时增加编译参数--with-expat=builtin
之前介绍了,由于64位服务器下编译脚本在定位系统 expat支持时有些问题。使用自带的expat来编译,也可以解决这个问题了。方法如下:
# ./configure --prefix=/usr/local/apache2 --enable-modules=so--enable-rewrite --with-expat=builtin
相关文章推荐
- /libexpat.so: could not read symbols: File in wrong format
- Apache 安装过程中出错/usr/lib/libexpat.so: could not read symbols: File in wrong format的解决办法
- GCC 源码编译 mpc mprf gmp 不用make(否则会有lib/libgmp.so: could not read symbols: File in wrong format等错误)
- 关于 could not read symbols: File in wrong format 问题的解决方案
- 解决vsftpd编译时的错误:could not read symbols: File in wrong format
- lib_clapack.a(dlasyf.o): could not read symbols: File in wrong format---- 交叉编译opencv2.0遇到的错误解决
- [linux+openscada+qt]could not read symbols: File in wrong format
- could not read symbols: File in wrong format
- could not read symbols: File in wrong format
- 解决vsftpd编译时的错误:could not read symbols: File in wrong format
- libexpat.so:could not read symbols...
- could not read symbols: File format not recognized
- could not read symbols: File format not recognized
- /usr/lib/libexpat.so: could not read symbols解决方法
- lib64SDL_intermediates/lib64SDL.a: could not read symbols: File format not recognized
- /usr/lib/libexpat.so: could not read symbols解决方法
- Apache编译安装:/usr/lib/libexpat.so: could not read symbols解决方法
- Could not automatically select an Xcode project. Specify one in your Podfile like so
- [!] Could not automatically select an Xcode project. Specify one in your Podfile like so: xcodeproj
- /usr/lib/libcxcore.so.2.1: could not read symbols: Invalid operation 解决方法