在编译apache和subversion都遇到”could not read symbols: File in wrong format“这样的问题,折腾了几把,发现解决办法如下:
(1)在编译apache时,发生了:
写道
/use/lib//usr/lib/libdb-4.2.so: could not read symbols: File in wrong format
经过折腾,发现原来是我之前单独了安装了apr、apr-util、sqlite 的缘故,因此,只要把这仨删除了即可。
(2)在编译subversion时,又发生了:
写道
/usr/lib/libexpat.so: could not read symbols: File in wrong format
google了一把,都说只要删除configure,然后在autogen.sh重新生成configure即可。最后发现,其实是由于我用的是64位机器的原因,解决办法也比较好办了。在configure后的选项中加上:LDFLAGS="-L/usr/lib64 -L/lib64",如:
写道
./configure --bindir=/usr/bin/
LDFLAGS="-L/usr/lib64 -L/lib64" --prefix=/usr/ --enable-shared --with-apr=/opt/httpd/bin/apr-1-config --with-apr-util=/opt/httpd/bin/apu-1-config --with-neon=/usr/ --with-ssl --with-sqlite=/usr/ --with-zlib=/usr/ --enable-FEATURE=huge --with-apxs=/opt/httpd/sbin/apxs --enable-maintainer-mode --libdir=/usr/lib64/