在linux中apr是非常常用的一个东西了,但有时你会发现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然后再安装 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 //phpfensi.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
经过上面的步骤我们就可以安装其他程序了,比如编译安装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。