linux編譯找不到apr apr-util

linux編譯找不到aprt apr-util

Linux很多地方編譯的時候都會用到apr
如果找不到apr就會報錯

configure: WARNING: APR not found
The Apache Portable Runtime (APR) library cannot be found.
Please install APR on this system and configure Subversion
with the appropriate –with-apr option.

You probably need to do something similar with the Apache
Portable Runtime Utility (APRUTIL) library and then configure
Subversion with both the –with-apr and –with-apr-util options.

apr是比較噁心的一個東東,因爲用直接用yum install apr安裝apr後,當再安裝其他東西需要apr環境時候 經常還是找不到,儘管已經安裝它了。

這樣的話我們只能通過下面這兩個參數來指定他們的位置了,但是首先要做的就是安裝apr和apr-until

–with-apr
–with-apr-util

apr 和 apr-util官網下載地址:

http://apr.apache.org/download.cgi

安裝順序是先安裝apr然後再安裝 apr-util,因爲安裝apr-util需要apr環境
首先安裝apr 指定安裝到/usr/local/apr

wget http://mirrors.cnnic.cn/apache/apr/apr-1.4.8.tar.gz
tar zxvf apr-1.4.8.tar.gz
cd apr-1.4.8
./configure --prefix=/usr/local/apr
make & make install

然後安裝apr-util,指定安裝到/usr/local/apr-util
wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.5.2.tar.gz
tar zxvf apr-util-1.5.2.tar.gz
cd apr-util-1.5.2
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make & make install

經過上面的步驟我們就可以安裝其他程序了,比如編譯安裝svn的時候指定apr和apr-util
指定svn位置/usr/local/subversion 同時也要指定apr和apr-util位置,代碼如下
wget http://mirror.esocc.com/apache/subversion/subversion-1.8.3.tar.gz
cd subversion-1.8.3.tar.gz
./configure --prefix=/usr/local/subversion --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
make & make install

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章