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

          原本想整整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的了。。。。
建議若是在作實驗的話,真的不必下最新版本的軟件來,血的教訓和檢驗啊。。。
相關文章
相關標籤/搜索