libapreq2:libtool:link:CURRENT`'必须是非负整数

时间:2013-07-14 15:12:55

标签: perl compiler-errors apache2 mod-perl libtool

当我尝试安装libapreq2时,出现错误:

libtool: link: CURRENT `' must be a nonnegative integer
libtool: link: `:0:8' is not valid version information

我该如何解决?

bash-3.2$ wget http://search.cpan.org/CPAN/authors/id/I/IS/ISAAC/libapreq2-2.13.tar.gz
bash-3.2$ tar xvf libapreq2-2.13.tar.gz
bash-3.2$ ./configure --enable-perl-glue --with-apache2-apxs=/install/others/apache2/bin/apxs --prefix=/install/others --with-apache2-src=/install/others/httpd-2.2.25 --with-apache2-httpd=/install/others/apache2/bin/httpd --with-apr-config=/install/others/httpd-2.2.25/srclib/apr/apr-1-config --with-apu-config=/install/others/httpd-2.2.25/srclib/apr-util/apu-1-config
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
........
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for ranlib... (cached) ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for /install/others/httpd-2.2.25/include/httpd.h... yes
checking for /install/others/httpd-2.2.25/srclib/apr/apr-1-config... yes
checking for /install/others/httpd-2.2.25/srclib/apr-util/apu-1-config... yes
checking for perl... perl
checking for ExtUtils::XSBuilder... yes
checking for mod_perl2... yes
checking for Apache::Test... yes
checking for ExtUtils::MakeMaker... yes
  setting APR_INCLUDES to " -I/install/others/httpd-2.2.25/srclib/apr/include "
  adding "-I/install/others/httpd-2.2.25/srclib/apr-util/include" to APR_INCLUDES
  adding "-I/install/others/httpd-2.2.25/srclib/apr-util/xml/expat/lib" to APR_INCLUDES
  setting APR_LTFLAGS to " /install/others/httpd-2.2.25/srclib/apr/libapr-1.la"
  adding "/install/others/httpd-2.2.25/srclib/apr-util/libaprutil-1.la" to APR_LTFLAGS
  setting APR_LIBS to " -luuid -lrt -lcrypt -lpthread -ldl"
  adding "/install/others/httpd-2.2.25/srclib/apr-util/xml/expat/libexpat.la" to APR_LIBS
  setting APR_LDFLAGS to " -L/install/others/httpd-2.2.25/srclib/apr-util -laprutil-1 "
  adding "-L/install/others/httpd-2.2.25/srclib/apr" to APR_LDFLAGS
  adding "-lapr-1" to APR_LDFLAGS
  setting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE"
expr: syntax error
libapreq2 Version: 2.8.0
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating library/Makefile
config.status: creating library/t/Makefile
config.status: creating module/Makefile
config.status: creating module/apache2/Makefile
config.status: creating glue/Makefile
config.status: creating build/doxygen.conf
config.status: creating include/groups.dox
config.status: creating apreq2-config
config.status: creating include/apreq_config.h
config.status: executing depfiles commands
bash-3.2$
bash-3.2$
bash-3.2$
bash-3.2$ make
Making all in .
make[1]: Entering directory `/install/others/libapreq2-2.13'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/install/others/libapreq2-2.13'
Making all in include
make[1]: Entering directory `/install/others/libapreq2-2.13/include'
make  all-am
make[2]: Entering directory `/install/others/libapreq2-2.13/include'
make[2]: Leaving directory `/install/others/libapreq2-2.13/include'
make[1]: Leaving directory `/install/others/libapreq2-2.13/include'
Making all in library
make[1]: Entering directory `/install/others/libapreq2-2.13/library'
make  all-am
make[2]: Entering directory `/install/others/libapreq2-2.13/library'
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -I/install/others/httpd-2.2.25/srclib/apr/include  -I/install/others/httpd-2.2.25/srclib/apr-util/include -I/install/others/httpd-2.2.25/srclib/apr-util/xml/expat/lib -DLINUX -D_REENTRANT -D_GNU_SOURCE  -g -O2 -MT util.lo -MD -MP -MF .deps/util.Tpo -c -o util.lo util.c
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -I../include -I/install/others/httpd-2.2.25/srclib/apr/include -I/install/others/httpd-2.2.25/srclib/apr-util/include -I/install/others/httpd-2.2.25/srclib/apr-util/xml/expat/lib -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -MT util.lo -MD -MP -MF .deps/util.Tpo -c util.c  -fPIC -DPIC -o .libs/util.o
 gcc -DHAVE_CONFIG_H -I. -I../include -I/install/others/httpd-2.2.25/srclib/apr/include -I/install/others/httpd-2.2.25/srclib/apr-util/include -I/install/others/httpd-2.2.25/srclib/apr-util/xml/expat/lib -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -MT util.lo -MD -MP -MF .deps/util.Tpo -c util.c -o util.o >/dev/null 2>&1
.........
 mv -f .deps/module_cgi.Tpo .deps/module_cgi.Plo
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -I/install/others/httpd-2.2.25/srclib/apr/include  -I/install/others/httpd-2.2.25/srclib/apr-util/include -I/install/others/httpd-2.2.25/srclib/apr-util/xml/expat/lib -DLINUX -D_REENTRANT -D_GNU_SOURCE  -g -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c -o error.lo error.c
 gcc -DHAVE_CONFIG_H -I. -I../include -I/install/others/httpd-2.2.25/srclib/apr/include -I/install/others/httpd-2.2.25/srclib/apr-util/include -I/install/others/httpd-2.2.25/srclib/apr-util/xml/expat/lib -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c  -fPIC -DPIC -o .libs/error.o
 gcc -DHAVE_CONFIG_H -I. -I../include -I/install/others/httpd-2.2.25/srclib/apr/include -I/install/others/httpd-2.2.25/srclib/apr-util/include -I/install/others/httpd-2.2.25/srclib/apr-util/xml/expat/lib -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -o error.o >/dev/null 2>&1
mv -f .deps/error.Tpo .deps/error.Plo
/bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2 -version-info :0:8  /install/others/httpd-2.2.25/srclib/apr/libapr-1.la /install/others/httpd-2.2.25/srclib/apr-util/libaprutil-1.la  -luuid -lrt -lcrypt  -lpthread -ldl /install/others/httpd-2.2.25/srclib/apr-util/xml/expat/libexpat.la  -o libapreq2.la -rpath /install/others/lib util.lo version.lo cookie.lo param.lo parser.lo parser_urlencoded.lo parser_header.lo parser_multipart.lo module.lo module_custom.lo module_cgi.lo error.lo
libtool: link: CURRENT `' must be a nonnegative integer
libtool: link: `:0:8' is not valid version information
make[2]: *** [libapreq2.la] Error 1
make[2]: Leaving directory `/install/others/libapreq2-2.13/library'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/install/others/libapreq2-2.13/library'
make: *** [all-recursive] Error 1
bash-3.2$
bash-3.2$
bash-3.2$ make install
Making install in .
make[1]: Entering directory `/install/others/libapreq2-2.13'
make[2]: Entering directory `/install/others/libapreq2-2.13'
test -z "/install/others/bin" || /bin/mkdir -p "/install/others/bin"
 /usr/bin/install -c 'apreq2-config' '/install/others/bin/apreq2-config'
cd /install/others/httpd-2.2.25; make install
make[3]: Entering directory `/install/others/httpd-2.2.25'
Making install in srclib
make[4]: Entering directory `/install/others/httpd-2.2.25/srclib'
Making install in apr
make[5]: Entering directory `/install/others/httpd-2.2.25/srclib/apr'
make[6]: Entering directory `/install/others/httpd-2.2.25/srclib/apr'
make[6]: Nothing to be done for `local-all'.
make[6]: Leaving directory `/install/others/httpd-2.2.25/srclib/apr'
/install/others/httpd-2.2.25/srclib/apr/build/mkdir.sh /install/others/apache2/lib /install/others/apache2/bin /install/others/apache2/build \
                     /install/others/apache2/lib/pkgconfig /install/others/apache2/include
/usr/bin/install -c -m 644 /install/others/httpd-2.2.25/srclib/apr/include/apr.h /install/others/apache2/include
for f in /install/others/httpd-2.2.25/srclib/apr/include/apr_*.h; do \
            /usr/bin/install -c -m 644 ${f} /install/others/apache2/include; \
        done
/bin/sh /install/others/httpd-2.2.25/srclib/apr/libtool --mode=install /usr/bin/install -c -m 755 libapr-1.la /install/others/apache2/lib
/usr/bin/install -c -m 755 .libs/libapr-1.so.0.4.8 /install/others/apache2/lib/libapr-1.so.0.4.8
(cd /install/others/apache2/lib && { ln -s -f libapr-1.so.0.4.8 libapr-1.so.0 || { rm -f libapr-1.so.0 && ln -s libapr-1.so.0.4.8 libapr-1.so.0; }; })
(cd /install/others/apache2/lib && { ln -s -f libapr-1.so.0.4.8 libapr-1.so || { rm -f libapr-1.so && ln -s libapr-1.so.0.4.8 libapr-1.so; }; })
/usr/bin/install -c -m 755 .libs/libapr-1.lai /install/others/apache2/lib/libapr-1.la
/usr/bin/install -c -m 755 .libs/libapr-1.a /install/others/apache2/lib/libapr-1.a
chmod 644 /install/others/apache2/lib/libapr-1.a
ranlib /install/others/apache2/lib/libapr-1.a
PATH="$PATH:/sbin" ldconfig -n /install/others/apache2/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /install/others/apache2/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/install -c -m 644 apr.exp /install/others/apache2/lib/apr.exp
/usr/bin/install -c -m 644 apr.pc /install/others/apache2/lib/pkgconfig/apr-1.pc
for f in libtool shlibtool; do \
            if test -f ${f}; then /usr/bin/install -c -m 755 ${f} /install/others/apache2/build; fi; \
        done
/usr/bin/install -c -m 755 /install/others/httpd-2.2.25/srclib/apr/build/mkdir.sh /install/others/apache2/build
for f in make_exports.awk make_var_export.awk; do \
            /usr/bin/install -c -m 644 /install/others/httpd-2.2.25/srclib/apr/build/${f} /install/others/apache2/build; \
        done
.............
/usr/bin/install -c .libs/libexpat.lai /install/others/apache2/lib/libexpat.la
/usr/bin/install -c .libs/libexpat.a /install/others/apache2/lib/libexpat.a
chmod 644 /install/others/apache2/lib/libexpat.a
ranlib /install/others/apache2/lib/libexpat.a
PATH="$PATH:/sbin" ldconfig -n /install/others/apache2/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /install/others/apache2/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/install -c -m 644 ./lib/expat.h /install/others/apache2/include
make[6]: Leaving directory `/install/others/httpd-2.2.25/srclib/apr-util/xml/expat'
/bin/sh /install/others/httpd-2.2.25/srclib/apr/libtool --mode=install /usr/bin/install -c -m 755 libaprutil-1.la /install/others/apache2/lib
libtool: install: warning: relinking `libaprutil-1.la'
(cd /install/others/httpd-2.2.25/srclib/apr-util; /bin/sh /install/others/httpd-2.2.25/srclib/apr/libtool  --silent --mode=relink gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/install/others/httpd-2.2.25/srclib/apr-util/include -I/install/others/httpd-2.2.25/srclib/apr-util/include/private -I/install/others/httpd-2.2.25/srclib/apr/include -I/install/others/httpd-2.2.25/srclib/apr-util/xml/expat/lib -version-info 5:2:5 -o libaprutil-1.la -rpath /install/others/apache2/lib buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_passwd.lo crypto/apr_sha1.lo crypto/crypt_blowfish.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo -luuid -lrt -lcrypt -lpthread -ldl /install/others/httpd-2.2.25/srclib/apr-util/xml/expat/libexpat.la /install/others/httpd-2.2.25/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl )
/usr/bin/install -c -m 755 .libs/libaprutil-1.so.0.5.2T /install/others/apache2/lib/libaprutil-1.so.0.5.2
(cd /install/others/apache2/lib && { ln -s -f libaprutil-1.so.0.5.2 libaprutil-1.so.0 || { rm -f libaprutil-1.so.0 && ln -s libaprutil-1.so.0.5.2 libaprutil-1.so.0; }; })
(cd /install/others/apache2/lib && { ln -s -f libaprutil-1.so.0.5.2 libaprutil-1.so || { rm -f libaprutil-1.so && ln -s libaprutil-1.so.0.5.2 libaprutil-1.so; }; })
/usr/bin/install -c -m 755 .libs/libaprutil-1.lai /install/others/apache2/lib/libaprutil-1.la
/usr/bin/install -c -m 755 .libs/libaprutil-1.a /install/others/apache2/lib/libaprutil-1.a
chmod 644 /install/others/apache2/lib/libaprutil-1.a
ranlib /install/others/apache2/lib/libaprutil-1.a
PATH="$PATH:/sbin" ldconfig -n /install/others/apache2/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /install/others/apache2/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/install -c -m 644 aprutil.exp /install/others/apache2/lib
/usr/bin/install -c -m 755 apu-config.out /install/others/apache2/bin/apu-1-config
make[5]: Leaving directory `/install/others/httpd-2.2.25/srclib/apr-util'
Making install in pcre
make[5]: Entering directory `/install/others/httpd-2.2.25/srclib/pcre'
make[6]: Entering directory `/install/others/httpd-2.2.25/srclib/pcre'
make[6]: Leaving directory `/install/others/httpd-2.2.25/srclib/pcre'
make[5]: Leaving directory `/install/others/httpd-2.2.25/srclib/pcre'
..................
Making install in support
make[4]: Entering directory `/install/others/httpd-2.2.25/support'
make[5]: Entering directory `/install/others/httpd-2.2.25/support'
make[5]: Leaving directory `/install/others/httpd-2.2.25/support'
make[4]: Leaving directory `/install/others/httpd-2.2.25/support'
make[4]: Entering directory `/install/others/httpd-2.2.25'
Installing configuration files
[PRESERVING EXISTING HTDOCS SUBDIR: /install/others/apache2/htdocs]
[PRESERVING EXISTING ERROR SUBDIR: /install/others/apache2/error]
[PRESERVING EXISTING ICONS SUBDIR: /install/others/apache2/icons]
[PRESERVING EXISTING CGI SUBDIR: /install/others/apache2/cgi-bin]
Installing header files
Installing build system files
Installing man pages and online manual
make[4]: Leaving directory `/install/others/httpd-2.2.25'
make[3]: Leaving directory `/install/others/httpd-2.2.25'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/install/others/libapreq2-2.13'
make[1]: Leaving directory `/install/others/libapreq2-2.13'
Making install in include
make[1]: Entering directory `/install/others/libapreq2-2.13/include'
make[2]: Entering directory `/install/others/libapreq2-2.13/include'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/install/others/include/apreq2" || /bin/mkdir -p "/install/others/include/apreq2"
 /usr/bin/install -c -m 644 'apreq.h' '/install/others/include/apreq2/apreq.h'
 /usr/bin/install -c -m 644 'apreq_cookie.h' '/install/others/include/apreq2/apreq_cookie.h'
 /usr/bin/install -c -m 644 'apreq_error.h' '/install/others/include/apreq2/apreq_error.h'
 /usr/bin/install -c -m 644 'apreq_module.h' '/install/others/include/apreq2/apreq_module.h'
 /usr/bin/install -c -m 644 'apreq_param.h' '/install/others/include/apreq2/apreq_param.h'
 /usr/bin/install -c -m 644 'apreq_parser.h' '/install/others/include/apreq2/apreq_parser.h'
 /usr/bin/install -c -m 644 'apreq_util.h' '/install/others/include/apreq2/apreq_util.h'
 /usr/bin/install -c -m 644 'apreq_version.h' '/install/others/include/apreq2/apreq_version.h'
make[2]: Leaving directory `/install/others/libapreq2-2.13/include'
make[1]: Leaving directory `/install/others/libapreq2-2.13/include'
Making install in library
make[1]: Entering directory `/install/others/libapreq2-2.13/library'
make  install-am
make[2]: Entering directory `/install/others/libapreq2-2.13/library'
/bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2 -version-info :0:8  /install/others/httpd-2.2.25/srclib/apr/libapr-1.la /install/others/httpd-2.2.25/srclib/apr-util/libaprutil-1.la  -luuid -lrt -lcrypt  -lpthread -ldl /install/others/httpd-2.2.25/srclib/apr-util/xml/expat/libexpat.la  -o libapreq2.la -rpath /install/others/lib util.lo version.lo cookie.lo param.lo parser.lo parser_urlencoded.lo parser_header.lo parser_multipart.lo module.lo module_custom.lo module_cgi.lo error.lo
libtool: link: CURRENT `' must be a nonnegative integer
libtool: link: `:0:8' is not valid version information
make[2]: *** [libapreq2.la] Error 1
make[2]: Leaving directory `/install/others/libapreq2-2.13/library'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/install/others/libapreq2-2.13/library'
make: *** [install-recursive] Error 1

注意:我没有root访问权限。我正在主目录/install/others中安装。服务器是RedHat Linux。

1 个答案:

答案 0 :(得分:-1)

以下是成功案例:http://www.perlmonks.org/?node_id=660325

### change the path accordingly
./configure --enable-shared --with-gnu-ld --enable-perl-glue --with-perl=/usr/bin/perl --with-apache2-apxs=/usr/sbin/apxs --with-httpd=/usr/sbin/httpd
/sbin/ldconfig /usr/lib

其他解决方案是使用perlbrew或local :: lib并在您家中安装本地perl,然后您可以使用cpanm安装它。