zoukankan      html  css  js  c++  java
  • cenos 6.5 安装apache 2.4.28出现种问题

    编译出错 configure: error: APR-util not found. Please read the documentation 解决办法

     

    wget http://apache.freelamp.com/apr/apr-1.4.2.tar.gz 下载apr

     

    ./configure –prefix=/usr/local/web/apr

     

    make

     

    make install

     

    wget http://apache.freelamp.com/apr/apr-util-1.3.10.tar.gz

     

    ./configure –prefix=/usr/local/web/apr-util –with-apr=/usr/local/web/apr

     

    make

     

    make install

     

    接下来从新编译apache

     

    ./configure –prefix=/usr/local/web/apache –enable-rewrite –enable-so –with-apr=/usr/local/web/apr –with-apr-util=/usr/local/web/apr-util

     

    晕啊 又出错

     

    configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

     

    wget http://cdnetworks-kr-2.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.tar.gz

     

    ./configure –prefix=/usr/local/web/pcre

     

    ./libtool: line 990: g++: command not found

     

    呵呵 又出错了 我无语了啊 要是没出错那就跳过这一步骤了

     

    若出错执行下面的命令了

     

    yum -y install gcc+ gcc-c++

     

    在执行./configure –prefix=/usr/local/web/pcre

     

    make

     

    make install

     

    在编译APACHE

     

    ./configure –prefix=/usr/local/web/apache –enable-rewrite –enable-so –with-apr=/usr/local/web/apr –with-apr-util=/usr/local/web/apr-util –with-pcre=/usr/local/web/pcre

     

    make

     

    make install

     

    OK了

     

     

     

    ======================================================================================================================================

    /bin/sh ./libtool --tag=CXX --mode=link g++ -O2 -version-info 0:0:0 -o libpcrecpp.la -rpath /usr/local/lib pcrecpp.lo pcre_scanner.lo pcre_stringpiece.lo libpcre.la

    libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.4.4/crtbeginS.o .libs/pcrecpp.o .libs/pcre_scanner.o .libs/pcre_stringpiece.o -Wl,-rpath -Wl,/usr/app/pcre-8.00/.libs -Wl,-rpath -Wl,/usr/local/lib ./.libs/libpcre.so -L/usr/lib/gcc/x86_64-redhat-linux/4.4.4 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.4.4/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../lib64/crtn.o -Wl,-soname -Wl,libpcrecpp.so.0 -o .libs/libpcrecpp.so.0.0.0

    /usr/bin/ld: .libs/pcrecpp.o: relocation R_X86_64_32S against `.bss'can not be used when making a shared object; recompile with -fPIC

    .libs/pcrecpp.o:could not read symbols: Bad value

    collect2: ld returned 1 exit status

    make[1]: *** [libpcrecpp.la] 错误 1

    make[1]: Leaving directory `/usr/app/pcre-8.00'

    make: *** [all] 错误 2

     

    解决办法:./configure --disable-shared --with-pic 之后执行:make 没有错误

  • 相关阅读:
    ActiveMQ 中的链表
    ActiveMQ 的线程池
    ActiveMQ broker解析
    ActiveMQ broker和客户端之间的确认
    ActiveMQ producer 流量控制
    基于大数据的精准营销与应用场景
    Math.abs为Integer.Min_VALUE返回错误的值
    使用http_load网站压力测试
    可伸缩系统的架构经验
    Tumblr:150亿月浏览量背后的架构挑战
  • 原文地址:https://www.cnblogs.com/zhaohonghao-blog/p/8299231.html
Copyright © 2011-2022 走看看