0

I'm trying to install Apache Server on my Ubuntu for using a web page made in PHP. I downloaded pcre, apr and apr-util and I configured, maked and make install all of them.

Then, when I came back to the Apache folder, the following command

sudo ./configure --prefix=/home/test/Apache/srclib/apr-util 
                 --with-apr=/home/test/Apache/srclib/apr 
                 --with-pcre=/home/test/Apache/pcre 
                 --with-included-apr

succeded.

Even the command

sudo make 

succeded. But, when I type sudo make install, I got the following error:

Makefile:79: recipe for target 'install' failed
make[2]: *** [install] Error 1
make[2]: Leaving directory '/home/test/Apache/srclib/apr-util'
/home/test/Apache/build/rules.mk:75: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/test/Apache/srclib'
/home/test/Apache/build/rules.mk:75: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

Please, could you give me any tip? Thank you

7
  • Possibly better asked on serverfault.com? Commented Sep 22, 2017 at 15:24
  • why not just use the pre-built package? Or are you trying to learn about compiling? Commented Sep 22, 2017 at 15:26
  • Sure you sudoed when doing install? Smells of permission issues. Commented Sep 22, 2017 at 15:27
  • If you mean the package in ubuntu repository, I can't access on Internet in my computer where Ubuntu is installed so I'm trying to do that manually. Commented Sep 22, 2017 at 15:28
  • Is version? 2.4.? Commented Sep 22, 2017 at 15:31

2 Answers 2

1

Maybe apr and apr-util versions needed by Apache 2.4.x are missing?. Or maybe you just need the -dev packages?

cd /usr/local/src/httpd-2.4.20/srclib
curl --remote-name http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
curl --remote-name http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz
tar -xzvf apr-1.5.2.tar.gz
tar -xzvf apr-util-1.5.4.tar.gz
mkdir apr
mkdir apr-util
mv apr-1.5.2/ apr
mv apr-util-1.5.4/ apr-util
cd ..

Then compile with

./configure --prefix=/usr/local/apache-2.4.20 --with-included-apr

Good resource: http://httpd.apache.org/docs/current/install.html Here is what they say about APR and APR-Util:

APR and APR-Util Make sure you have APR and APR-Util already installed on your system. If you don't, or prefer to not use the system-provided versions, download the latest versions of both APR and APR-Util from Apache APR, unpack them into /httpd_source_tree_root/srclib/apr and /httpd_source_tree_root/srclib/apr-util (be sure the directory names do not have version numbers; for example, the APR distribution must be under /httpd_source_tree_root/srclib/apr/) and use ./configure's --with-included-apr option. On some platforms, you may have to install the corresponding -dev packages to allow httpd to build against your installed copy of APR and APR-Util.

Sign up to request clarification or add additional context in comments.

Comments

0

Do you have apt-get? If so, you can use
sudo apt-get install apache2 apache2-utils libapache2-mod-php5 php5 php-pear php5-xcache php5-mysql php5-curl php5-gd. This will install all Apache and PHP software.

2 Comments

No I don't because my PC (where Ubuntu is installed) can't be connected to Internet.
@user2896152 do you have ethernet cable?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.