/libexpat.so: could not read symbols: File in wrong format
今天在Centos 5.5 64位的机器上源码编译graphviz发生了错误
找到了以下解决办法:
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