歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 曲折的源碼安裝http2.3.6版本

曲折的源碼安裝http2.3.6版本

日期:2017/2/28 16:03:06   编辑:Linux教程

本來想整整httpd和tomca的整合試驗,在網上找了個資料,就開始試驗了,本人一向比較喜歡用RPM包來安裝東西的,今天不知為啥,想用源碼包來安裝,好嗎,我下了最新的httpd的2.3.6版本的源碼包,丟到了服務器上。

悲劇開始了,第一步 configure就通不過啊,下面貼出一部分報錯內容

[root@rep1 httpd]# ./configure --prefix=/usr/local/apache --enable-modules=so --enable-so
checking for chosen layout... Apache Applying OS-specific hints for httpd ... forcing SINGLE_LISTEN_UNSERIALIZED_ACCEPT to "1"
forcing AP_NONBLOCK_WHEN_MULTI_LISTEN to "1"
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking for APR version 1.3.0 or later... no
configure: error: APR version 1.3.0 or later is required 報錯內容說我的APR的版本太低,我看了下我的版本都是1.2.7的,好嗎,沒關系,我安裝一個高的,我下了個 apr-1.4.2.tar.gz,安裝好了,再來一次,依舊悲劇啊。。。 [root@rep1 httpd]# ./configure --prefix=/usr/local/apache --enable-modules=so --enable-so --with-apr=/usr/local/src/apr-1.4.2
checking for chosen layout... Apache
checking for working mkdir -p... yes 。。。 checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking for APR version 1.3.0 or later... yes
checking for APR-util version 1.3.0 or later... no
configure: error: APR-util version 1.3.0 or later is required
[root@rep1 httpd]# 呵呵,說我的APR-UTIL的版本太低,沒辦法,我用下了apr_1.3.8.orig.tar.gz來安裝,這個時候,在make的時候老是報錯, [root@rep1 apr-util]# ./configure --with-apr=/usr/local/src/apr-1.4.2/ [root@rep1 apr-util]# make
make[1]: Entering directory `/usr/local/src/apr-util'
make[1]: *** No rule to make target `crypto/apr_md5.c', needed by `crypto/apr_md5.lo'. Stop.
make[1]: Leaving directory `/usr/local/src/apr-util'
make: *** [all-recursive] Error 1
[root@rep1 apr-util]# make install
make: *** No rule to make target `crypto/apr_md5.c', needed by `crypto/apr_md5.lo'. Stop.
[root@rep1 apr-util]#
問了網上的群友,說我的apr的路徑不對,怎麼不對了,我是奇怪了,我明明都是指向正確的,接下來的一段時間內那個糾結啊,換了N多個apr和apr-util的版本,TMD的人都快瘋了,結果都是不成功,百般無奈之下到瘋狂的百度,看到一篇文章也是說遇到我同樣的問題,說編譯httpd報錯的時候,一般依賴文件都在httpd的源碼裡面自帶的,我想,不會我下的這個源碼包不全吧,打開在仔細看看,果然沒有那個文章裡面說的srclib這個文件夾,於是又到官網上去下包,反正又下了個我認為的源碼包,下來了才看清晰,好像下錯了啦-------httpd-2.3.6-deps.tar.bz2,不對,這個名字?我打開一看,果然有個SRCLIB,NND,我高興壞了,趕緊丟到服務器上,果然安裝APR和apr-util都很順利。。。 最後來到http的文件夾內開始congfigure。。。 [root@rep1 httpd-2.3.6]# ./configure --prefix=/usr/local/apache2 --enable-modules=so --enable-so --with-apr=/usr/local/src/httpd-2.3.6/srclib/apr --with-apr-util=/usr/local/src/httpd-2.3.6/srclib/apr-util/ 。。。。。。。 configure: error: mod_so can not be built as a shared DSO
眼看最後關鍵的最後了,還給我報錯。。。結果我把--enable-modules=so 這個參數刪除了,居然成功了。。。那個汗顏啊。。。 一個上午盡在折騰安裝一個httpd的了。。。。
Copyright © Linux教程網 All Rights Reserved