当apachectl开始获取共享对象文件时 [英] While apachectl start getting open shared object file

查看:87
本文介绍了当apachectl开始获取共享对象文件时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用tar文件安装apache网络服务器.因此,我已经下载并下载了httpd-2.4.tar文件.

然后,我尝试安装

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

但是抛出这个错误

  configure:错误:找不到APR.请阅读文档.配置:错误:找不到libpcre的pcre-config.PCRE是必需的,可以从http://pcre.org/获得. 

因此,请点击此链接并修复此问题

我遵循了这个链接搜索* .so文件,该链接不存在.因此,我重新安装了,但只有创建* .la和* .a文件而不是* .so文件,

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

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

更改后

  httpd:/usr/local/apache/conf/httpd.conf的第66行的语法错误:无法将modules/mod_authn_file.la加载到服务器中:/usr/local/apache/modules/mod_authn_file.la:无效的ELF标头 

建议我,如何解决此问题以及原因,请创建* .a,*.la文件而不是* .so.

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

解决方案

您在哪里解压了httpd的源代码?另外,"httpd-2.4.tar"这个名字听起来并没有官方下载.

无论如何,.la和.a文件是源文件,它们不是模块,您可以使用vim查看它们的含义(至少是.la文件)

 执行以下步骤:*从原始来源下载:http://httpd.apache.org/download.cgi*解压到〜/source-httpd/* cd〜/source-httpd/* rm -Rf/usr/local/apache(或那里的任何文件)* ./configure --prefix =/usr/local/apache --enable-mpms-shared = all --with-mpm = event --enable-mods-shared = all(...以及其他选项)*检查输出以了解可能缺少的库和功能,安装必要的唇形并使用相同的参数再次运行配置"或根据需要进行调整*制作&&进行安装* ls -l/usr/local/apache/modules检查.so文件是否确实存在.*配置并相应地运行httpd 

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:

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?

解决方案

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

这篇关于当apachectl开始获取共享对象文件时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆