博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
/usr/lib/libexpat.so: could not read symbols解决方法
阅读量:2492 次
发布时间:2019-05-11

本文共 953 字,大约阅读时间需要 3 分钟。

编译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

转载地址:http://hnmrb.baihongyu.com/

你可能感兴趣的文章
PCB反推理念
查看>>
京东技术架构(一)构建亿级前端读服务
查看>>
php 解决json_encode中文UNICODE转码问题
查看>>
LNMP 安装 thinkcmf提示404not found
查看>>
PHP empty、isset、innull的区别
查看>>
apache+nginx 实现动静分离
查看>>
通过Navicat远程连接MySQL配置
查看>>
phpstorm开发工具的设置用法
查看>>
Linux 系统挂载数据盘
查看>>
Git基础(三)--常见错误及解决方案
查看>>
Git(四) - 分支管理
查看>>
PHP Curl发送数据
查看>>
HTTP协议
查看>>
HTTPS
查看>>
git add . git add -u git add -A区别
查看>>
apache下虚拟域名配置
查看>>
session和cookie区别与联系
查看>>
PHP 实现笛卡尔积
查看>>
Laravel中的$loop
查看>>
CentOS7 重置root密码
查看>>