简体   繁体   English

为CentOS 6.5构建httpd-2.4.7 RPM时找不到库`/usr/lib64/libexpat.la'

[英]cannot find the library `/usr/lib64/libexpat.la' when building httpd-2.4.7 RPM for CentOS 6.5

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. 我正在遵循http://httpd.apache.org/docs/2.4/platform/rpm.html中的说明为CentOS6.5构建httpd-2.4.7 RPM。 But I got the following errors - cannot find the library `/usr/lib64/libexpat.la'. 但是我遇到了以下错误-找不到库`/usr/lib64/libexpat.la'。

rpmbuild -tb httpd-2.4.7.tar.bz2 rpmbuild -tb httpd-2.4.7.ta​​r.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 ..... / 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' libtool:链接: 找不到库/usr/lib64/libexpat.la' or unhandled argument /usr/lib64/libexpat.la'
make[2]: * [htpasswd] Error 1 make [2]: * [htpasswd]错误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 [2]:离开目录/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 make:* [all-recursive]错误1
error: Bad exit status from /var/tmp/rpm-tmp.iSxbcs (%build) 错误:从/var/tmp/rpm-tmp.iSxbcs(%build)退出状态错误
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.iSxbcs (%build) RPM构建错误:从/var/tmp/rpm-tmp.iSxbcs退出状态错误(%build)

I ran yum search libexpat , the package has been installed. 我运行yum搜索libexpat ,该软件包已安装。

[root@localhost Downloads]# yum search libexpat [root @ localhost下载]#yum搜索libexpat
Loaded plugins: fastestmirror, refresh-packagekit, security 加载的插件:最快的镜像,refresh-packagekit,安全性
Loading mirror speeds from cached hostfile 从缓存的主机文件加载镜像速度
* base: centos.les.net *基数:centos.les.net
* extras: mirror.its.sfu.ca *其他:mirror.its.sfu.ca
* updates: mirror.csclub.uwaterloo.ca *更新:mirror.csclub.uwaterloo.ca
======= Matched: libexpat ========================== compat-expat1.i686 : A library for parsing XML documents =======匹配:libexpat ========================== compat-expat1.i686:用于解析XML文档的库
compat-expat1.x86_64 : A library for parsing XML documents compat-expat1.x86_64:用于解析XML文档的库
expat.i686 : An XML parser library expat.i686:XML解析器库
expat.x86_64 : An XML parser library expat.x86_64:一个XML解析器库
expat-devel.i686 : Libraries and header files to develop applications using expat expat-devel.i686:使用expat开发应用程序的库和头文件
expat-devel.x86_64 : Libraries and header files to develop applications using expat expat-devel.x86_64:使用expat开发应用程序的库和头文件
mingw32-expat.noarch : MinGW Windows port of expat XML parser library mingw32-expat.noarch:Expat XML解析器库的MinGW Windows端口

Anyone knows how to solve this issue. 任何人都知道如何解决此问题。 Thanks in advance. 提前致谢。

Steve 史蒂夫

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. 使用包括libexpat.la并带有httpd的APR和APR-util库。

A .la file is for libtool to know how to link a library. .la文件供libtool知道如何链接库。 It's probably in expat-devel , and should be added to the .spec file as a BuildRequires . 它可能在expat-devel ,应该作为BuildRequires添加到.spec文件中。

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 . 尝试将apr和apr-util的源代码目录复制到apache的srclib目录中,然后使用./configure --with-included-apr This solved my issue. 这解决了我的问题。

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

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

./configure --with-included-apr

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM