【问题标题】:While apachectl start getting open shared object file虽然 apachectl 开始打开共享对象文件
【发布时间】:2017-04-22 13:11:03
【问题描述】:

我尝试使用 tar 文件安装 apache 网络服务器。所以,我下载了 httpd-2.4.tar 文件并解压。

然后,我尝试安装

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

但是,抛出这个错误

 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/

所以,请点击此链接并修复此 issue1issue2

然后,运行以下命令:

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


2. $ make 

3. $ make install

之后/我去 /usr/local/apache/

启动服务

 $  bin/apachectl -k start 

抛出以下错误:

    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

转到 apache/modules/

*.so 文件不存在,只有 *.a 和 *.la 文件存在,

参考:

我跟着这个link 搜索 *.so 文件,不在那里。所以,我重新安装了,但同样的问题只是创建 *.la 和 *.a 文件而不是 *.so 文件,

然后,我尝试更改 /apache/conf/httpd.conf

LoadModule authn_core_module modules/mod_authn_core.soLoadModule authn_core_module modules/mod_authn_core.la

改变后,

 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

建议我,我该如何解决这个问题以及为什么,创建 *.a、*.la 文件而不是 *.so。

*.so 文件更新为 *.la 文件?,如果最新意味着为什么不支持?

【问题讨论】:

  • 您的问题解决了吗?怎么样?

标签: apache server webserver httpd.conf .so


【解决方案1】:

您在哪里解压了 httpd 的源代码?此外,“httpd-2.4.tar”这个名字听起来肯定不是官方下载的。

在任何情况下,.la 和 .a 文件都带有源代码,它们不是模块,您可以使用 vim 查看它们以了解它们是什么(至少 .la 文件)

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

【讨论】:

  • 我运行“./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 ", 里面没有 *.so.why?
猜你喜欢
  • 1970-01-01
  • 2011-12-23
  • 2013-04-21
  • 2013-05-05
  • 2017-05-21
  • 2012-05-24
  • 2014-02-10
  • 2021-01-06
  • 2018-07-03
相关资源
最近更新 更多