Reputation: 1593
I am trying to install apache in my linux machine. But when I tried ./configure --prefix = /usr/local/apache
it shows an error configure: error: APR not found. Please read the documentation
. I tried to install apr
with yum install apr apr-deve
and it says
Package apr-1.4.6-1.fc15.x86_64 already installed and latest version
No package apr-deve available.
Nothing to do
What should I do now? Please excuse I am a newbie to LINUX
Upvotes: 33
Views: 120093
Reputation: 21
For RHEL Linux, install the following packags:
yum install apr-devel apr-util-devel pcre-devel
Upvotes: 2
Reputation: 1
The following command works on my mac.
Prerequisites:
brew install apr
brew install pcre
In fact, the link is missing, so http can't be found
brew link apr
brew link pcre
Copy the prompt you see
vim ~/.bash_profile
export PATH="/usr/local/opt/apr/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/apr/lib"
export CPPFLAGS="-I/usr/local/opt/apr/include"
export PATH="/usr/local/opt/apr-util/bin:$PATH"
then, try again
source ~/.bash_profile
./configure
Upvotes: 0
Reputation: 656
sudo apt-get install libapr1-dev libaprutil1-dev
use this command in linux
Upvotes: 0
Reputation: 692
In the directory where you have installed the apache httpd distribution there is a directory that is called /srclib
You cd into that directory cd /srclib
.
Make sure you are in that folder. Now open your browser and go to http://apr.apache.org/download.cgi
and download the apr-*.tar.gz files into this directory.
wget <link>
Unzip and extract them into srclib directory after extracting make sure you rename the apr-* directories to just "apr" and "apr-util", respectively. For example:
mv apr-1.6.5 apr
mv apr-util-1.6.1 apr-util
Now, it should read the .apr files from that folder.
After that it will ask for apr-util
too, make sure you follow the same procedure.
Hope this helps!
Upvotes: 38
Reputation: 971
Actualy I had to install aprutils also... So try using:
sudo apt-get install libapr1-dev libaprutil1-dev
Upvotes: 45
Reputation: 63
There are several ways of doing this download latest apr and apr-utils from https://apr.apache.org/
tar xzvf apr.XXX.tar.gz
tar xzvf apr-util,XXX.tar.gz
Solution 1 mv apr.XXX httpd.XYZ/srclib/apr mv apr-util.XXX httpd.XYZ/srclib/apr-util
you should be able to see
ls httpd.XYZ/srclib/apr-util
apr apr-util
now cofigure apache via
./configure --with-included-apr --other-options-that-you-want
Solution 2
mv apr && ./configure && make && make install
mv apr-util && ./configure && make && make install
mv httpd.XYZ/
./configure --with-apr=/usr/local/apr -other-options-that-you-want
NOTE : /usr/local/apr (CENTOS),your Distro might use different one
Upvotes: 3
Reputation: 1164
You have to download APR and APR-UTIL packages. install the above downloaded packages from source using below commands ./configure -prefix= make make install
Then run your above mentioned command as below ./configure -prefix= -with-apr= -with-apr-util=
Upvotes: 1
Reputation: 1300
If your install on apache 2.2 or less than add flag --with-included-apr
If you are using 2.4 than you can go to https://apr.apache.org/download.cgi and download the latest apr and apr-util. Unpack them and move them into the apache source file into /srclib. Make sure they are named apr and apr-util not apr.x.x.x. Then you can use the --with-included-apr flag
Upvotes: 9
Reputation: 1618
For my linux rig, I got past this by downloading the apr-dev package using the local package manager:
opkg install libapr-1-dev
That was on Angstrom linux, so your command version will likely be different, replacing opkg with apt-get or whatever your distro's package manager is.
Upvotes: 3