首页 技术 正文
技术 2022年11月20日
0 收藏 877 点赞 2,782 浏览 2316 个字

引自:http://blog.chinaunix.net/uid-28458801-id-4211258.html


error1:出现以下错误时候,需要下载安装apr

configure: error: APR not found.  Please read the documentation.

apr下载地址:http://apr.apache.org/download.cgi


前言:

linux下,默认安装软件,在开发过程中会经常不知道到什么路径下找到所需的程序,因此手动安装程序对后续的使用会提供非常大的便利。在此,以安装apache为例。

一,准备
    1,安装 apr
        下载地址:http://apr.apache.org/download.cgi

[root@ubuntu:/work/soft/apache]# tar jxvf apr-1.5.0.tar.bz2

[root@@ubuntu:/work/soft/apache/apr-1.5.0]# ./configure –prefix=/work/installed/apr

[root@@ubuntu:/work/soft/apache/apr-1.5.0]# make

[root@@ubuntu:/work/soft/apache/apr-1.5.0]# make install

2,安装 apr-util
        下载地址:http://apr.apache.org/download.cgi
            [root@ubuntu:/work/soft/apache]# tar jxvf  apr-util-1.5.3.tar.bz2

[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# ./configure –prefix=/work/installed/apr-util –with-apr=/work/installed/apr

[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# make

[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# make install

3,安装 pcre
        下载地址:http://pcre.org/
            [root@ubuntu:/work/soft/apache]# tar jxvf  pcre-8.35.tar.bz2

[root@@ubuntu:/work/soft/apache/pcre-8.35]# ./configure –prefix=/work/installed/pcre

[root@@ubuntu:/work/soft/apache/pcre-8.35]# make

[root@@ubuntu:/work/soft/apache/pcre-8.35]# make install

注意:如果在安装 pcre 时,遇到问题:configure: error: You need a C++ compiler for C++ support.
        解决方法:sudo apt-get install build-essential

二,安装apache
        下载地址:http://httpd.apache.org/
            [root@ubuntu:/work/soft/apache]# tar jxvf  httpd-2.4.9.tar.bz2

[root@@ubuntu:/work/soft/apache/httpd-2.4.9]#  ./configure –prefix=/work/installed/apache –with-apr=/work/installed/apr –with-apr-util=/work/installed/apr-util –with-pcre=/work/installed/pcre

[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# make

[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# make install

三,配置
        1,修改配置文件
            否则会出现问题:
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
            解决方法:
            [root@ubuntu:/work/installed/apache]# sudo gedit conf/httpd.conf
            把:
                # ServerName www.example.com:80
            改为:
                ServerName localhost:80

2,启动
            [root@ubuntu:/work/installed/apache]# ./bin/apachectl start

3,开机启动
            打开文件:/etc/rc.local
            [root@ubuntu:/]# sudo gedit /etc/rc.local

添加:/work/installed/apache/bin/apachectl start

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,104
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,580
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,428
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,200
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,835
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,918