linux安装源码包未解决

简介:

源码包安装
约定:源码包放在 cd/use/local/src

我先把httpd源码包下载到cd/use/local/src 如下所示
下载源码包

#cd/usr/local/src/
[root@localhost src]# wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.gz 下载源包

[root@localhost src]# wget http://mirrors.cnnic.cn/aparche/httpd-2.2.32.tar.gz
-bash: wget: 未找到命令 说明没有安装wget 命令,执行#yum intall -y wget
2018-01-10 13:54:04 错误 404:Not Found。出现这种情况说明下载链接是错误的,需要更新链接
#echo $? 结果是0 表示上一步正确,1表示上一步错误
下载完之后查看文件的类型
[root@localhost src]# ls
apr-util-1.6.1.tar.gz 说明是一个tar .gz的压缩包

解压压缩包
[root@localhost src]# tar -zxvf apr-util-1.6.1.tar.gz 解压源码包
apr-util-1.6.1/
apr-util-1.6.1/strmatch/
apr-util-1.6.1/strmatch/apr_strmatch.c
apr-util-1.6.1/uri/
apr-util-1.6.1/uri/apr_uri.c
apr-util-1.6.1/apr-util.spec
apr-util-1.6.1/README.FREETDS
....
....
配置相关选项——指定安装路径
[root@localhost apr-util-1.6.1]# ./configure --prefix=/usr/local/apache2 指定安装路径
出现如下错误
checking for gcc... no 说明没有安装gcc
checking for cc... no
checking for cl.exe... no

安装gcc
#yum install -y gcc
重新执行配置选项
[root@localhost apr-util-1.6.1]# ./configure --prefix=/usr/local/apache2
安装gcc之后还出现如下报错
[root@localhost apr-util-1.6.1]# ./configure --prefix=/usr/local/apache2
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
APR-util Version: 1.6.1
checking for chosen layout... apr-util
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
Applying apr-util hints file rules for x86_64-pc-linux-gnu
checking for APR... no
configure: error: APR could not be located. Please use the --with-apr option.
提示:configure: error: APR could not be located. Please use the --with-apr option. 说明需要指定--with-apr参数
指定参数编译
#./configure --with-apr=/usr/local/apr

编译完后结果还报错结果如下:

[root@localhost apr-util-1.6.1]# ./configure --with-apr=/usr/local/apr
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
APR-util Version: 1.6.1
checking for chosen layout... apr-util
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
Applying apr-util hints file rules for x86_64-pc-linux-gnu
checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.
[root@localhost apr-util-1.6.1]# echo $?
1
错误提示checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file. 说明:配置错误:with-apr参数不正确,它必须指定一个安装前缀,一个构建目录或是一个配置apr文件。




本文转自 yzllinux 51CTO博客,原文链接:http://blog.51cto.com/12947851/2059262,如需转载请自行联系原作者

相关文章
|
4天前
|
NoSQL Linux 测试技术
Redis的安装(Linux版)
Redis的安装(Linux版)
42 1
|
14天前
|
缓存 Linux 测试技术
安装【银河麒麟V10】linux系统--并挂载镜像
安装【银河麒麟V10】linux系统--并挂载镜像
73 0
|
14天前
|
Linux C语言
linux yum安装ffmpeg 图文详解
linux yum安装ffmpeg 图文详解
34 0
|
14天前
|
NoSQL Linux Redis
linux 下和win下安装redis 并添加开机自启 图文详解
linux 下和win下安装redis 并添加开机自启 图文详解
17 0
|
14天前
|
Linux
linux yum 安装rar和unrar
linux yum 安装rar和unrar
47 0
|
26天前
|
Java Linux Maven
Linux中安装MAVEN环境配置
Linux中安装MAVEN环境配置
59 3
|
17小时前
|
监控 安全 Linux
Linux系统之安装ServerBee服务器监控工具
【4月更文挑战第22天】Linux系统之安装ServerBee服务器监控工具
10 2
|
1天前
|
Linux 开发工具 Android开发
Docker系列(1)安装Linux系统编译Android源码
Docker系列(1)安装Linux系统编译Android源码
3 0
|
1天前
|
Ubuntu Linux 开发工具
WSL2(3)安装Linux headers完美解决方案
WSL2(3)安装Linux headers完美解决方案
3 0
|
1天前
|
Linux 开发工具 C语言
Linux 安装 gcc 编译运行 C程序
Linux 安装 gcc 编译运行 C程序
11 0