1

I try to install apache webserver using tar file. So, I have download httpd-2.4.tar file and extract.

then, I try to install

 1. ./configure --prefix=/usr/local/apache

but, throw, this error

 configure: error: APR not found.  Please read the documentation.

 configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

so, follow this link and fix this issue1 and issue2

Then, run following command:

1.  $./configure \
--with-included-apr \
--with-pcre=/usr/local/pcre/bin/pcre-config \
--prefix=/usr/local/apache


2. $ make 

3. $ make install

After that / I go to /usr/local/apache/

Start the Service:

 $  bin/apachectl -k start 

Throw below error:

    httpd: Syntax error on line 66 of /usr/local/apache/conf/httpd.conf: Cannot load modules/mod_authn_file.so into server: /usr/local/apache/modules/mod_authn_file.so: cannot open shared object file: No such file or directory

go to apache/modules/

*.so files not there, only *.a and *.la file are there,

Reference:

enter image description here

I follw this link to Search *.so files , is not there. So, I resinstalled but same issue only create *.la and *.a files instead of *.so files,

Then, I try to change /apache/conf/httpd.conf

LoadModule authn_core_module modules/mod_authn_core.so to LoadModule authn_core_module modules/mod_authn_core.la

after Change,

 httpd: Syntax error on line 66 of /usr/local/apache/conf/httpd.conf: Cannot load modules/mod_authn_file.la into server: /usr/local/apache/modules/mod_authn_file.la: invalid ELF header

Suggest me, How can i fix this issue and why, create *.a, *.la file instead of *.so.

*.so files updated to *.la files?, if latest means why cannot support?

Community
  • 1
  • 1
Rajkumar .E
  • 1,440
  • 3
  • 20
  • 34

1 Answers1

0

Where did you untar the source for httpd? Also that name "httpd-2.4.tar" certainly does not sound as an official download.

In any case, .la and .a files come with the source, they are not modules, you can view them with vim to see what they are (at least the .la files)

Follow these steps:

* Download from the original source: http://httpd.apache.org/download.cgi
* Untar onto ~/source-httpd/
* cd ~/source-httpd/
* rm -Rf /usr/local/apache (or whatever you had there)
* ./configure --prefix=/usr/local/apache --enable-mpms-shared=all --with-mpm=event --enable-mods-shared=all (.... and any other options)
* Review the ouput for missing libs and functionality you may need, install necessary lips and run "configure" again with the same parameters or adjusted to your needs
* make && make install
* ls -l /usr/local/apache/modules to check the .so files are really there.
* Configure and run httpd accordingly
Daniel Ferradal
  • 2,727
  • 1
  • 13
  • 19
  • i run "./configure --prefix=/usr/local/apache CC=aarch64-linux-gnu-gcc --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-ssl=/usr/local/openssl --sysconfdir=/etc/apache -with-apr-iconv=/usr/local/apr-iconv --enable-mpms-shared=all --with-mpm=event --enable-mods-shared=all ", there util is no *.so.why? – yanzhang.guo Dec 04 '20 at 10:59