手动编译httpd(非yum安装),需要先安装apr和apr-util

> **第一步:安装apr**

典型安装三部曲:
./configure
make
make install

安装apr的时候,configure一直报错:

```
config.status: executing libtool commands
rm: cannot remove `libtoolT': No such file or directory
```
开始先去下载并安装了一下libtool:http://mirror.hust.edu.cn/gnu/libtool/
安装成功后,再次回到apr configure,依然报错。

在网上看了一些材料,都是说要把在configure里面 的RM='$RM'改为RM='$RM  -f'。比如:http://blog.csdn.net/a673341766/article/details/9078011
不过我查看了一下configure文件里面的发现RM是正常的,无错误:
```
: ${CP="cp -f"}
: ${MV="mv -f"}
: ${RM="rm -f"}
```
然后去下载且手动编译autoconf和automake
http://ftp.gnu.org/gnu/automake/?C=M;O=A

```
[root@oc0515384300 Downloads]# cd autoconf-2.69
[root@oc0515384300 autoconf-2.69]# ls
aclocal.m4  BUGS       ChangeLog    ChangeLog.2  config.status  COPYING            doc          lib       Makefile     man     tests
AUTHORS     build-aux  ChangeLog.0  ChangeLog.3  configure      COPYING.EXCEPTION  GNUmakefile  m4        Makefile.am  NEWS    THANKS
bin         cfg.mk     ChangeLog.1  config.log   configure.ac   COPYINGv3          INSTALL      maint.mk  Makefile.in  README  TODO
[root@oc0515384300 autoconf-2.69]# autoreconf --force --install
[root@oc0515384300 autoconf-2.69]# cd ..
[root@oc0515384300 Downloads]# cd libtool-2.4.6
[root@oc0515384300 libtool-2.4.6]# ls
aclocal.m4  bootstrap.conf  ChangeLog    config.log     configure.ac  GNUmakefile  libtool        m4        Makefile.am  README    THANKS
AUTHORS     build-aux       config.h     config.status  COPYING       INSTALL      libtoolize     maint.mk  Makefile.in  stamp-h1  TODO
bootstrap   cfg.mk          config-h.in  configure      doc           libltdl      libtoolize.in  Makefile  NEWS         tests
[root@oc0515384300 libtool-2.4.6]# libtoolize --automake --force
[root@oc0515384300 libtool-2.4.6]# cd ..
[root@oc0515384300 Downloads]# cd automake-1.15
[root@oc0515384300 automake-1.15]# ls
aclocal.m4  bin           ChangeLog   config.status  configure.ac  COPYING  gen-testsuite-part  HACKING  lib  maintainer  Makefile.am  NEWS  PLANS   runtest  THANKS
AUTHORS     bootstrap.sh  config.log  configure      contrib       doc      GNUmakefile         INSTALL  m4   Makefile    Makefile.in  old   README  t
[root@oc0515384300 automake-1.15]# automake --force --add-missing
[root@oc0515384300 automake-1.15]# cd ..
```
再来configure一遍apr看看。依然报错。
看到这篇文章http://bbs.chinaunix.net/thread-3752960-1-1.html,然后在/usr/local/bin这个目录下ls看看,还缺了个m4,再去下载手动编译m4看看:http://ftp.gnu.org/gnu/m4/?C=M;O=A
编译完成后再去/usr/local/bin看看,已经有m4了。

再回去编译apr试试。依然不行- -我要吐血身亡了……没办法,耐着性子再去terminal里输入autoconf,依然没安装成功。如果安装成功应该可以输入autoconf一类的命令。好吧!重新回到autoconf里,make的时候发现一个小问题:

```
/home/elsa/Downloads/autoconf-2.69/build-aux/missing: line 81: help2man: command not found
WARNING: 'help2man' is missing on your system.
         You should only need it if you modified a dependency of a man page.
         You may want to install the GNU Help2man package:
         <http://www.gnu.org/software/help2man/>
make[2]: *** [config.guess.1] Error 127
make[2]: Leaving directory `/home/elsa/Downloads/autoconf-2.69/man'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/elsa/Downloads/autoconf-2.69'
make: *** [all] Error 2
```
难道是这个help2man的问题?再去下载编译看看。
http://ftp.gnu.org/gnu/help2man/?C=M;O=A

因为只有xz结尾的,xz -d xxx.xz解压该help2man文件。
然后完成后回去弄autoconf……再次出现新问题……好像砸电脑啊有木有!

```
WARNING: 'makeinfo' is missing on your system.
         You should only need it if you modified a '.texi' file, or
         any other file indirectly affecting the aspect of the manual.
         You might want to install the Texinfo package:
         <http://www.gnu.org/software/texinfo/>
         The spurious makeinfo call might also be the consequence of
         using a buggy 'make' (AIX, DU, IRIX), in which case you might
         want to install GNU make:
         <http://www.gnu.org/software/make/>
make[2]: *** [autoconf.info] Error 127
make[2]: Leaving directory `/home/elsa/Downloads/autoconf-2.69/doc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/elsa/Downloads/autoconf-2.69'
make: *** [all] Error 2

```
真是特别醉……看来我要把这个/usr/local/bin装得跟/usr/bin/差不多才行,否则...不说了我先去哭一会……

```
#在GNU上有这么一段说明,看来装makeinfo直接装texinfo即可。
makeinfo is part of the texinfo distribution.
Get texinfo-*.tar.gz.

However, all GNU distributions should come with prebuilt info files,
thus makeinfo should not be needed.  If you notice a distribution
that does not come with *.info files, please report it as a bug.
```
然而那个最新更新版本有个.tex结尾的,用gedit可以打开。不过好像只是个文档文件而已。所以直接下载texinfo-6.0的gz版本即可。在configure这个texinfo的过程中,又发现了新的问题:

```
configure: WARNING: Could not find a terminal library among tinfo ncurses curses termlib termcap terminfo
configure: WARNING: The programs from `info' directory will not be built.
```
搜索了一下,发现了一个邮件
http://archive.linuxfromscratch.org/mail-archives/lfs-support/2014-April/046811.html
看样子是要安装gawk和perl,
gawk可以在gnu里下载http://ftp.gnu.org/gnu/gawk/?C=M;O=A
perl得去官网下载https://www.perl.org/get.html
看了一下,perl已经在本地的yum里安装,然而这对我没有啥卵用……因为人家是纯手动编译安装的。所以我还是自己去下载一个编译好了。
```
Libraries have been installed in:
   /usr/local/lib/gawk
```
看到这句话应该是gawk安装成功了。

查看README文档里perl-5.22.0的安装步骤(实际操作中多了make这一步):
```
 ./Configure -des -Dprefix=$HOME/localperl
 make test
 make install
#查看perl的使用文档
 perldoc perl
```
安装时间好长……等的我肚子都饿了……我看到我之前下载的ubuntu.iso都下好了。看来perl真是耗时间大户。看来以后要第一时间安装perl这个东西。预估完成时间超过10分钟。所以小伙伴们如果真的需要安装perl这个东西……真的是可以该干嘛干嘛去……
```
All tests successful.
Elapsed: 527 sec
u=5.06  s=1.08  cu=238.64  cs=19.51  scripts=2219  tests=709261
```
热泪盈眶地看到这一句!Perl终于安装好了。才527秒?8分钟?我不信-。-
好吧我们接着回到texinfo吧。等等……我才输入到make test,也就是还有最后一句make install还没输入……然而我已经输入了make install了。好像没有啥用处。不知道perl安装上了没有。回到texinfo问题也依然存在。这是为啥?

```
ls /usr/local/bin/perl
ls: cannot access /usr/local/bin/perl: No such file or directory
```
没有该文档。看来perl还是没安装上。

>>>>>>>未完待续<<<<<<<<<

Linux上手动编译apache相关推荐

  1. linux环境手动编译安装Nginx实践过程 附异常解决

    linux环境手动编译安装Nginx实践过程 附异常解决 参考文章: (1)linux环境手动编译安装Nginx实践过程 附异常解决 (2)https://www.cnblogs.com/david9 ...

  2. Linux下手动编译shogun

    手动编译shogun,如果按照直接按照官网上的步骤进行,会踩非常多的坑,下面分享一下在下的编译过程,希望能为阁下提供些许借鉴. 1. git clone https://github.com/shog ...

  3. linux上erlang编译安装手记

    以下仅为在本人电脑上通过opt编译安装二郎的步骤手记. 如果在您参照本人安装过程执行时遇到缺少某些erlang编译依赖的库.工具等提示时,请勿慌张,可以谷歌搜索安装具体目标的方法. 首先下载otp_s ...

  4. Linux上安装编译lzo报错:Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run 已解决

    1.详细报错信息 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (build- ...

  5. linux php mysql安装包下载_在linux下手动安装 apache, php, mysql--终极版

    卸载dnf安装的httpd: 纯文本照样可以做到 "有格式的", 通过 "缩进, 空格, tab, 连字符如- , : , ... 等" . 有一个基本原则就是 ...

  6. linux apache 手动安装教程,linux下手动安装apache

    下面是官方文档的要求,必须安装APR.APR-Util.PCRE,gcc-c++等包,文档URL地址http://httpd.apache.org/docs/2.4/install.html. 所以, ...

  7. Linux如何手动编译fcitx文件,linux下安装和配置fcitx中文输入法

    我的系统是ubuntu9.10 系统装好后首先要做的就是安装中文输入法.在网上找了一些中文输入法的资料,最常用的是Fcitx和SCIM输入法.不过好像SCIM的问题比较多,而且据说Fcitx的功能上也 ...

  8. linux上热编译react,如何使用react进行热加载

    一) 安装bable相关命令 5.1 使用 NPM 配置 React 开发环境 image.png 二) 项目打包编译命令相关的安装 image.png 三) 打包运行项目 image.png 四) ...

  9. linux上C++编译过程

    一:哪些代码是在预处理的时候运行的: (1)include头文件 (2)导入库 (3)宏定义 二:编译 编译:是代码转成汇编语言 三:汇编 汇编:将汇编代码转换成二进制,注意:第二步和第三步可以简单理 ...

最新文章

  1. 设计模式5-抽象工厂模式
  2. Silverlight Blend动画设计系列五:故事板(StoryBoards)和动画(Animations)
  3. 2021-06-05
  4. Ribbon客户端负载均衡介绍
  5. 老蒋的 用WDCP 搭建
  6. warning: ISO C++ forbids converting a string constant to ‘char*‘ [-Wwrite-strings]
  7. Flink 在米哈游的落地实践
  8. 笔记本独显和集显linux,笔记本电脑独显不见了的解决方法介绍
  9. Android 抖音爱心动画,Android实现抖音心形函数
  10. 现在世界上到底有多少飞机?
  11. 新语法之CORRESPONDING
  12. Right-BICEP要求设计四则运算2
  13. linux环境安装部署RF+Jenkins+Git(非完整版)
  14. 因收费被抵制、如今又被明星索赔百万,丰巢出路在何方?
  15. [转]SEO做关键词的十大分析方法
  16. avahi-daemon启动失败-解决方法-linux
  17. Arcgis常用功能 Python脚本
  18. 2018年全国多校算法寒假训练营练习比赛(第五场)F-The Biggest Water Problem
  19. 部分选中文件的快捷键
  20. IDEA访问数据库时,其中一个字段数据库中有值,但是访问到的数据的时候其中一个始终是null

热门文章

  1. Android 四大组件基本介绍
  2. mysql高阶语句一
  3. Google Colab 读取/存储 云盘内的文件
  4. 一般杀毒软件检测病毒原理
  5. 三、WEB漏洞-逻辑越权
  6. 烟花特效-第14届蓝桥杯STEMA测评Scratch真题精选
  7. 解决火狐浏览器52版本,es6无法编译问题
  8. 射频连接器的无源互调特性和寿命
  9. 无法启动此程序,因为计算机中丢失 VCRUNTIME140_1.dll。
  10. Jim's游戏外挂学习笔记3——继续找当前地图数据和所处坐标存放的地址