-1

I am trying to install Apache2 on Linux. I downloaded the latest Apache, apr, and apr-util. I am currently trying to run the make command on terminal, but there is an error message. See below.

I had tried to do: (from other sources, tried googling this, but it didn't solve the problem)

  • go to the root and try it. Same error.
  • apt-get install apache2
  • apt-get update
  • apt-get install libpcre3 libpcre3-dev
  • sudo apt-get install libexpat-dev

Here is the console output with errors at the bottom:

dfi@dfi-HP-Compaq-6005-Pro-SFF-PC ~/httpd-2.4.33 $ make
Making all in srclib
make[1]: Entering directory '/home/dfi/httpd-2.4.33/srclib'
Making all in apr
make[2]: Entering directory '/home/dfi/httpd-2.4.33/srclib/apr'
make[3]: Entering directory '/home/dfi/httpd-2.4.33/srclib/apr'
make[3]: Nothing to be done for 'local-all'.
make[3]: Leaving directory '/home/dfi/httpd-2.4.33/srclib/apr'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/srclib/apr'
Making all in apr-util
make[2]: Entering directory '/home/dfi/httpd-2.4.33/srclib/apr-util'
make[3]: Entering directory '/home/dfi/httpd-2.4.33/srclib/apr-util'
make[3]: Nothing to be done for 'local-all'.
make[3]: Leaving directory '/home/dfi/httpd-2.4.33/srclib/apr-util'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/srclib/apr-util'
make[1]: Leaving directory '/home/dfi/httpd-2.4.33/srclib'
Making all in os
make[1]: Entering directory '/home/dfi/httpd-2.4.33/os'
Making all in unix
make[2]: Entering directory '/home/dfi/httpd-2.4.33/os/unix'
make[3]: Entering directory '/home/dfi/httpd-2.4.33/os/unix'
make[3]: Nothing to be done for 'local-all'.
make[3]: Leaving directory '/home/dfi/httpd-2.4.33/os/unix'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/os/unix'
make[1]: Leaving directory '/home/dfi/httpd-2.4.33/os'
Making all in server
make[1]: Entering directory '/home/dfi/httpd-2.4.33/server'
Making all in mpm
make[2]: Entering directory '/home/dfi/httpd-2.4.33/server/mpm'
Making all in event
make[3]: Entering directory '/home/dfi/httpd-2.4.33/server/mpm/event'
make[4]: Entering directory '/home/dfi/httpd-2.4.33/server/mpm/event'
make[4]: Nothing to be done for 'local-all'.
make[4]: Leaving directory '/home/dfi/httpd-2.4.33/server/mpm/event'
make[3]: Leaving directory '/home/dfi/httpd-2.4.33/server/mpm/event'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/server/mpm'
make[2]: Entering directory '/home/dfi/httpd-2.4.33/server'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/server'
make[1]: Leaving directory '/home/dfi/httpd-2.4.33/server'
Making all in modules
make[1]: Entering directory '/home/dfi/httpd-2.4.33/modules'
Making all in aaa
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/aaa'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/aaa'
Making all in cache
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/cache'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/cache'
Making all in core
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/core'
make[3]: Entering directory '/home/dfi/httpd-2.4.33/modules/core'
make[3]: Nothing to be done for 'local-all'.
make[3]: Leaving directory '/home/dfi/httpd-2.4.33/modules/core'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/core'
Making all in database
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/database'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/database'
Making all in debugging
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/debugging'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/debugging'
Making all in filters
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/filters'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/filters'
Making all in http
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/http'
make[3]: Entering directory '/home/dfi/httpd-2.4.33/modules/http'
make[3]: Nothing to be done for 'local-all'.
make[3]: Leaving directory '/home/dfi/httpd-2.4.33/modules/http'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/http'
Making all in loggers
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/loggers'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/loggers'
Making all in metadata
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/metadata'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/metadata'
Making all in proxy
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/proxy'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/proxy'
Making all in session
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/session'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/session'
Making all in slotmem
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/slotmem'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/slotmem'
Making all in proxy/balancers
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/proxy/balancers'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/proxy/balancers'
Making all in arch/unix
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/arch/unix'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/arch/unix'
Making all in dav/main
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/dav/main'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/dav/main'
Making all in generators
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/generators'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/generators'
Making all in dav/fs
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/dav/fs'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/dav/fs'
Making all in mappers
make[2]: Entering directory '/home/dfi/httpd-2.4.33/modules/mappers'
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/modules/mappers'
make[1]: Leaving directory '/home/dfi/httpd-2.4.33/modules'
Making all in support
make[1]: Entering directory '/home/dfi/httpd-2.4.33/support'
make[2]: Entering directory '/home/dfi/httpd-2.4.33/support'
/home/dfi/httpd-2.4.33/srclib/apr/libtool --silent --mode=link gcc  -g -O2 -pthread         -o htpasswd  htpasswd.lo passwd_common.lo       /home/dfi/httpd-2.4.33/srclib/apr-util/libaprutil-1.la /home/dfi/httpd-2.4.33/srclib/apr/libapr-1.la -lrt -lcrypt -lpthread -ldl -lcrypt
/home/dfi/httpd-2.4.33/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_GetErrorCode'
/home/dfi/httpd-2.4.33/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_SetEntityDeclHandler'
/home/dfi/httpd-2.4.33/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_ParserCreate'
/home/dfi/httpd-2.4.33/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_SetCharacterDataHandler'
/home/dfi/httpd-2.4.33/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_ParserFree'
/home/dfi/httpd-2.4.33/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_SetUserData'
/home/dfi/httpd-2.4.33/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_StopParser'
/home/dfi/httpd-2.4.33/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_Parse'
/home/dfi/httpd-2.4.33/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_ErrorString'
/home/dfi/httpd-2.4.33/srclib/apr-util/.libs/libaprutil-1.so: undefined reference to `XML_SetElementHandler'
collect2: error: ld returned 1 exit status
Makefile:48: recipe for target 'htpasswd' failed
make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory '/home/dfi/httpd-2.4.33/support'
/home/dfi/httpd-2.4.33/build/rules.mk:75: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/dfi/httpd-2.4.33/support'
/home/dfi/httpd-2.4.33/build/rules.mk:75: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

EDIT: I found out what is wrong. I need to install GNU autoconf and GNU libtool.

Tomson Tai
  • 1
  • 1
  • 3
  • Try `sudo apt-get install libexpat-dev` (looks like [here](http://mail-archives.apache.org/mod_mbox/apr-dev/201706.mbox/%3CCAJtcoLauYUCHERDucRLG-EAm839cTD6D2x0QWUuEvHYEHS-mDg@mail.gmail.com%3E) is a similar problem) – yeputons Jun 14 '18 at 21:40
  • I forgot I did that before. So, it did not work. – Tomson Tai Jun 14 '18 at 22:28
  • Found out what's wrong. I had to install GNU autoconf and GNU libtool. – Tomson Tai Jun 14 '18 at 23:13

3 Answers3

0

Debian

Autoconf:

$ cd /usr/local/src
$ sudo wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
$ sudo tar xf autoconf*
$ cd autoconf-2.69
$ sudo sh configure --prefix /usr/local
$ sudo make install

Automake

$ cd /usr/local/src
$ sudo wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
$ sudo tar xf automake*
$ cd automake-1.15
$ sudo sh configure --prefix /usr/local
$ sudo make install

Libtool

$ cd /usr/local/src
$ sudo wget http://mirror.jre655.com/GNU/libtool/libtool-2.4.6.tar.gz
$ sudo tar xf libtool*
$ cd libtool-2.4.6
$ sudo sh configure --prefix /usr/local
$ sudo make install 

And after installing the previous packages I reconfigure if the error persists, before compiling and installing. This is what made me work.

$ sudo sh configure --prefix /usr/local/apache2
$ sudo make install

With these commands, the following errors are solved:

  • Makefile:48: recipe for target 'htpasswd' failed
  • /httpd/build/rules.mk:75: recipe for target 'all-recursive' failed

Source

PetoMPP
  • 78
  • 10
Braian Coronel
  • 22,105
  • 4
  • 57
  • 62
0

Please check systemctl status httpd (if you installed httpd already) and you run command: dnf remove httpd and you remove source rm -rf /home/root/httpd-2.4.33 and you wget https://httpd.apache.org/download.cgi#apache2

0

This message appears when apr and apr-util are not installed correctly. When I compile from a source file and get the same symptoms, I get a message such as "apr_file_printf" not found.

Giorgi Gvimradze
  • 1,714
  • 1
  • 17
  • 34
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 14 '22 at 19:15