无法找到库' /usr/lib64/libexpat。当为CentOS 6.5构建httpd-2.4.7 RPM时

时间:2022-10-06 09:59:04

I am following up the instruction from http://httpd.apache.org/docs/2.4/platform/rpm.html to build httpd-2.4.7 RPM for CentOS6.5. But I got the following errors - cannot find the library `/usr/lib64/libexpat.la'.

我正在跟踪http://httpd.apache.org/docs/2.4/platform/rpm.html的指令来构建CentOS6.5的httpd-2.4.7 RPM。但是我得到了以下错误——无法找到库' /usr/lib64/libexpat.la'。

rpmbuild -tb httpd-2.4.7.tar.bz2

rpmbuild一样httpd-2.4.7.tar.bz2

..... /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -std=gnu99 -pthread -O2 -g -pie -o htpasswd htpasswd.lo passwd_common.lo /usr/lib64/libaprutil-1.la -ldb-4.3 -lexpat -ldb-4.3 /usr/lib64/libapr-1.la -lpthread -ldl -lcrypt
libtool: link: cannot find the library /usr/lib64/libexpat.la' or unhandled argument/usr/lib64/libexpat.la'
make[2]: * [htpasswd] Error 1
make[2]: Leaving directory /root/rpmbuild/BUILD/httpd-2.4.7/support'<br> make[1]: *** [all-recursive] Error 1<br> make[1]: Leaving directory/root/rpmbuild/BUILD/httpd-2.4.7/support'
make: *
[all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.iSxbcs (%build)
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.iSxbcs (%build)

...../usr/lib64/apr / 1/build/libtool—silent—mode=link gcc -std=gnu99 -pthread -O2 -g -pie -o htpasswd。lo passwd_common。lo /usr/lib64/libaprutil-1。la -ldb-4.3 -lexpat -ldb-4.3 /usr/lib64/libapr-1。la -lpthread -ldl -lcrypt libtool: link:无法找到库/usr/lib64/ libexpatt。拉”或/ usr / lib64 / libexpat未处理的参数。创建[2]:* [htpasswd]错误1创建[2]:离开目录/root/rpmbuild/BUILD/httpd-2.4.7/support'
创建[1]:*** **[全递归]错误1
创建[1]:离开目录/root/rpmbuild/BUILD/ BUILD/ BUILD/ supportiSxbcs (%build) RPM构建错误:从/var/tmp/rpm-tmp的糟糕退出状态iSxbcs构建(%)

I ran yum search libexpat, the package has been installed.

我运行yum搜索libexpat,包已经安装好了。

[root@localhost Downloads]# yum search libexpat
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.les.net
* extras: mirror.its.sfu.ca
* updates: mirror.csclub.uwaterloo.ca
======= Matched: libexpat ========================== compat-expat1.i686 : A library for parsing XML documents
compat-expat1.x86_64 : A library for parsing XML documents
expat.i686 : An XML parser library
expat.x86_64 : An XML parser library
expat-devel.i686 : Libraries and header files to develop applications using expat
expat-devel.x86_64 : Libraries and header files to develop applications using expat
mingw32-expat.noarch : MinGW Windows port of expat XML parser library

[root@localhost下载]# yum搜索libexpat加载的插件:fastestmirror, refresh-packagekit,安全加载镜像速度从缓存的主机文件* base: centos.les.net * extras: mirror.its.sfu。ca *更新:mirror.csclub.uwaterloo。ca = = = = = = =匹配:libexpat = = = = = = = = = = = = = = = = = = = = = = = = = = compat-expat1。i686:用于解析XML文档compat-expat1的库。x86_64:解析XML文档的库。i686: XML解析器库扩展名。x86_64: XML解析器库扩展。i686:使用expat expat-devel开发应用程序的库和头文件。x86_64:使用expat mingw32-expat开发应用程序的库和头文件。noarch: MinGW Windows端口的expat XML解析器库

Anyone knows how to solve this issue. Thanks in advance.

谁都知道怎么解决这个问题。提前谢谢。

Steve

史蒂夫

3 个解决方案

#1


1  

The INSTALL doc states that you can:

安装文档说明您可以:

./configure --with-included-apr

to use APR and APR-util libraries which include libexpat.la and come with httpd.

使用APR和APR-util库,包括libexpat。和httpd一起来。

#2


0  

A .la file is for libtool to know how to link a library. It's probably in expat-devel, and should be added to the .spec file as a BuildRequires.

la文件用于libtool,用于了解如何链接库。它可能在expat-devel中,应该作为BuildRequires添加到.spec文件中。

#3


0  

Install apr and apr-util before installing apache.

在安装apache之前安装apr和apr-util。

libexpat.la comes along with the source code of apr-util.

libexpat。la附带了apr-util的源代码。

Try copying source code directory of apr and apr-util into srclib directory of apache and use ./configure --with-included-apr. This solved my issue.

尝试将apr和apr-util的源代码目录复制到apache的srclib目录中并使用。/configure——with-include -apr。这解决了我的问题。

cp -r /path/of/apr /path/of/apache/srclib/

cp -r /path/of/apr-util /path/of/apache/srclib/

./configure --with-included-apr

#1


1  

The INSTALL doc states that you can:

安装文档说明您可以:

./configure --with-included-apr

to use APR and APR-util libraries which include libexpat.la and come with httpd.

使用APR和APR-util库,包括libexpat。和httpd一起来。

#2


0  

A .la file is for libtool to know how to link a library. It's probably in expat-devel, and should be added to the .spec file as a BuildRequires.

la文件用于libtool,用于了解如何链接库。它可能在expat-devel中,应该作为BuildRequires添加到.spec文件中。

#3


0  

Install apr and apr-util before installing apache.

在安装apache之前安装apr和apr-util。

libexpat.la comes along with the source code of apr-util.

libexpat。la附带了apr-util的源代码。

Try copying source code directory of apr and apr-util into srclib directory of apache and use ./configure --with-included-apr. This solved my issue.

尝试将apr和apr-util的源代码目录复制到apache的srclib目录中并使用。/configure——with-include -apr。这解决了我的问题。

cp -r /path/of/apr /path/of/apache/srclib/

cp -r /path/of/apr-util /path/of/apache/srclib/

./configure --with-included-apr