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,如需转载请自行联系原作者

相关文章
|
10天前
|
缓存 Linux 测试技术
安装【银河麒麟V10】linux系统--并挂载镜像
安装【银河麒麟V10】linux系统--并挂载镜像
61 0
|
10天前
|
Linux C语言
linux yum安装ffmpeg 图文详解
linux yum安装ffmpeg 图文详解
28 0
|
10天前
|
NoSQL Linux Redis
linux 下和win下安装redis 并添加开机自启 图文详解
linux 下和win下安装redis 并添加开机自启 图文详解
15 0
|
10天前
|
Linux
linux yum 安装rar和unrar
linux yum 安装rar和unrar
35 0
|
22天前
|
Java Linux Maven
Linux中安装MAVEN环境配置
Linux中安装MAVEN环境配置
49 3
|
23天前
|
存储 负载均衡 索引
linux7安装elasticsearch-7.4.0集群配置
linux7安装elasticsearch-7.4.0集群配置
109 0
|
27天前
|
Linux 数据安全/隐私保护 虚拟化
Linux技术基础(1)——操作系统的安装
本文是龙蜥操作系统(Anolis OS) 8.4 的安装指南,用户可以从[龙蜥社区下载页面](https://openanolis.cn/download)获取ISO镜像。安装方法包括物理机的光驱和USB闪存方式,以及虚拟机中的VMware Workstation Pro设置。安装过程涉及选择语言、配置安装目标、选择软件集合和内核,设置Root密码及创建新用户。安装完成后,可通过文本模式或图形化界面验证系统版本,如Anolis OS 8.4,标志着安装成功。
|
22天前
|
消息中间件 Java Linux
Linux下RabbitMQ安装与使用
Linux下RabbitMQ安装与使用
32 1
|
3天前
|
关系型数据库 MySQL Linux
Linux联网安装MySQL Server
Linux联网安装MySQL Server
13 0
|
10天前
|
Java Linux 开发工具
linux jdk的安装
linux jdk的安装
16 0