/usr/lib/libexpat.so: could not read symbols解决方法
来源:互联网 发布:许巍和汪峰 知乎 编辑:程序博客网 时间:2024/05/21 08:55
编译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
- /usr/lib/libexpat.so: could not read symbols解决方法
- /usr/lib/libexpat.so: could not read symbols解决方法
- libexpat.so:could not read symbols...
- Apache 安装过程中出错/usr/lib/libexpat.so: could not read symbols: File in wrong format的解决办法
- /usr/lib/libcxcore.so.2.1: could not read symbols: Invalid operation 解决方法
- /libexpat.so: could not read symbols: File in wrong format
- Could not read symbols解决方法
- Could not read symbols解决方法
- Could not read symbols解决方法
- Could not read symbols解决方法
- Could not read symbols解决方法
- Could not read symbols解决方法
- Could not read symbols解决方法
- Could not read symbols解决方法
- php make报错:/usr/local/openssl/lib/libssl.a: could not read symbols: Bad value
- /usr/local/lib/libz.a: could not read symbols: Bad value
- recompile with -fPIC /usr/local/lib/libboost_python.a: could not read symbols: Bad value
- TTserver 编译/usr/local/lib/libbz2.a: could not read symbols: Bad value解决
- NIO 包及工作原理收藏
- python安装pywin32出现DLL load failed的解决办法
- ADO.NET数据访问的流程
- VC读取utf-8格式文本文件
- Smarty快速入门之三 填充Select元素
- /usr/lib/libexpat.so: could not read symbols解决方法
- VC list control中设置某行选中
- 算法问题集
- C++设计模式-工厂方法
- ural 1613【hash+二分】
- 51单片机普通IO口模拟IIC总线的程序实现
- Powershell 操作hyper-v 一般性操作
- WebView loadData出错(奇怪的设计)
- 做游戏用