在linux中apr是非常常用的一個東西了,但有時你會發(fā)現(xiàn)apr編輯安裝時提示configure: WARNING: APR not found錯誤了,下面小編就為各位介紹解決辦法.
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環(huán)境時候 經(jīng)常還是找不到,盡管已經(jīng)安裝它了,這樣的話我們只能通過下面這兩個參數(shù)來指定他們的位置了,但是首先要做的就是安裝apr和apr-until,代碼如下:
--with-apr
--with-apr-util
apr 和 apr-util官網(wǎng)下載地址:http://apr.apache.org/download.cgi
安裝順序是先安裝apr然后再安裝 apr-util,因為安裝apr-util需要apr環(huán)境,首先安裝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 //Vevb.com
- 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
經(jīng)過上面的步驟我們就可以安裝其他程序了,比如編譯安裝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
新聞熱點
疑難解答
圖片精選