系统为CentOS6.10,现在想把httpd升级为2.4.39,make的时候出现错误提示,apr,apr-util,pcre已经安装好,具体信息如下,求教各位高手帮忙解决[root@localhost http]# cd apr-1.7.0
[root@localhost apr-1.7.0]# ./configure --prefix=/usr/local/apr[root@localhost apr-1.7.0]# cd ../apr-util-1.6.1
[root@localhost apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config[root@localhost apr-util-1.6.1]# cd ../pcre-8.43
[root@localhost pcre-8.43]# ./configure --prefix=/usr/local/pcre --with-apr=/usr/local/apr/bin/apr-1-config[root@localhost pcrepcre-8.43]# cd ../httpd-2.4.39
[root@localhost httpd-2.4.39]# ./configure --prefix=/usr/local/apache --with-pcre=/usr/local/pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-utilconfigure: error: Did not find pcre-config script at /usr/local/pcre
[root@localhost httpd-2.4.39]# ./configure --prefix=/usr/local/apache --with-pcre=/usr/local/pcre2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util    Server Version: 2.4.39
    Install prefix: /usr/local/apache
    C compiler:     gcc -std=gnu99
    CFLAGS:          -g -O2 -pthread
    CPPFLAGS:        -DLINUX -D_REENTRANT -D_GNU_SOURCE
    LDFLAGS:
    LIBS:
    C preprocessor: gcc -E[root@localhost httpd-2.4.39]# makeab.o: In function `ssl_print_cert_info':
/soft/http/httpd-2.4.39/support/ab.c:653: undefined reference to `X509_get_version'
/soft/http/httpd-2.4.39/support/ab.c:655: undefined reference to `X509_getm_notBefore'
/soft/http/httpd-2.4.39/support/ab.c:659: undefined reference to `X509_getm_notAfter'
ab.o: In function `ssl_state_cb':
/soft/http/httpd-2.4.39/support/ab.c:575: undefined reference to `SSL_in_init'
/soft/http/httpd-2.4.39/support/ab.c:575: undefined reference to `SSL_is_server'
ab.o: In function `sk_X509_num':
/usr/local/include/openssl/x509.h:99: undefined reference to `OPENSSL_sk_num'
ab.o: In function `sk_X509_value':
/usr/local/include/openssl/x509.h:99: undefined reference to `OPENSSL_sk_value'
ab.o: In function `ssl_proceed_handshake':
/soft/http/httpd-2.4.39/support/ab.c:759: undefined reference to `EC_curve_nid2nist'
ab.o: In function `main':
/soft/http/httpd-2.4.39/support/ab.c:2305: undefined reference to `TLS_client_method'
/soft/http/httpd-2.4.39/support/ab.c:2560: undefined reference to `TLS_client_method'
/soft/http/httpd-2.4.39/support/ab.c:2637: undefined reference to `OPENSSL_init_ssl'
/soft/http/httpd-2.4.39/support/ab.c:2638: undefined reference to `OPENSSL_init_ssl'
/soft/http/httpd-2.4.39/support/ab.c:2647: undefined reference to `SSL_CTX_set_options'
ab.o: In function `test':
/soft/http/httpd-2.4.39/support/ab.c:1990: undefined reference to `SSL_in_init'
collect2: ld returned 1 exit status
make[2]: *** [ab] 错误 1
make[2]: Leaving directory `/soft/http/httpd-2.4.39/support'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/soft/http/httpd-2.4.39/support'
make: *** [all-recursive] 错误 1

解决方案 »

  1.   

    你的pcre目录不是/usr/local/pcre吗,为什么编译apache的时候指定pcre目录的时候是/usr/local/pcre2啊
    另外
    先把解压好的apr和apr-util放在httpd-2.4.39/srclib里(带上apr,apr-util文件夹)。然后编译apache的时候加上--with-included-apr 
      

  2.   


    ./configure --prefix=/usr/local/apache --with-included-apr --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --with-z=/usr/local/zlib --enable-so --enable-modules=all --enable-mods-shared=all --enable-deflate --enable-headers按照这个编译还是存在同样的问题,apr和apr-util也已经放过来了