我正在为一个大型perl应用程序一起攻击开发环境的噩梦,我无法安装这个perl模块:
$ sudo cpanm APR::Request
--> Working on APR::Request
Fetching http://www.cpan.org/authors/id/I/IS/ISAAC/libapreq2-2.13.tar.gz ... OK
Configuring libapreq2-2.13 ... OK
Building and testing libapreq2-2.13 ... FAIL
! Installing APR::Request failed. See /home/lurk21/.cpanm/work/1393021653.19831/build.log for details. Retry with --force to force install it.
/bin/bash ../../libtool --tag=CC --mode=link gcc -g -O2 -export-dynamic -module -avoid-version `/home/lurk21/.cpanm/work/1393021304.15288/libapreq2-2.13/apreq2-config --link-libtool --libs` /usr/local/apache2/lib/libapr-1.la /usr/local/apache2/lib/libaprutil-1.la -o mod_apreq2.la -rpath `/usr/local/apache2/bin/apxs -q LIBEXECDIR` handle.lo filter.lo
gcc -shared .libs/handle.o .libs/filter.o -Wl,--rpath -Wl,/home/lurk21/.cpanm/work/1393021304.15288/libapreq2-2.13/library/.libs -Wl,--rpath -Wl,/usr/local/apache2/lib -Wl,--rpath -Wl,/usr/local/apache2/lib /home/lurk21/.cpanm/work/1393021304.15288/libapreq2-2.13/library/.libs/libapreq2.so -lrt -lcrypt -lpthread -ldl -lexpat /usr/local/apache2/lib/libapr-1.so /usr/local/apache2/lib/libaprutil-1.so -Wl,-soname -Wl,mod_apreq2.so -o .libs/mod_apreq2.so
/usr/bin/ld: cannot find -lexpat
collect2: error: ld returned 1 exit status
当然, - force不会安装它,我认为无论如何我都不喜欢它。奇怪的是,这两个文件都存在:
/usr/local/apache2/lib/libapr-1.so
/usr/local/apache2/lib/libaprutil-1.so
我安装了libapr:
$ aptitude search libapr | egrep "^i"
i A libapr1 - Apache Portable Runtime Library
i A libapr1-dev - Apache Portable Runtime Library - Developm
i libapreq2-3 - generic Apache request library
i libapreq2-dev - generic Apache request library - developme
i A libapreq2-doc - generic Apache request library - documenta
i A libaprutil1 - Apache Portable Runtime Utility Library
i A libaprutil1-dbd-sqlite3 - Apache Portable Runtime Utility Library -
i A libaprutil1-ldap - Apache Portable Runtime Utility Library -
是什么给出了?
答案 0 :(得分:2)
提示是
/usr/bin/ld: cannot find -lexpat
意思是,您需要安装expat XML解析器库。尝试其中一个
sudo apt-get install expat
sudo yum install expat