在 apachectl 开始打开共享对象文件期间:没有这样的文件或目录 [英] During apachectl start getting open shared object file: No such file or directory

查看:24
本文介绍了在 apachectl 开始打开共享对象文件期间:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

成功安装 Apache2(2.4.4) 后,我尝试启动 https 服务器,但出现以下错误

After successfully installation of Apache2(2.4.4) i tried to start https server but i am getting below error

bimlesh@server:/usr/local/apache2/bin$ ./apachectl start
httpd: Syntax error on line 71 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/mod_authn_core.so into server: /usr/local/apache2/modules/mod_authn_core.so: cannot open shared object file: No such file or directory
bimlesh@server:/usr/local/apache2/bin$ 

我查看了 /usr/local/apache2/modules/ 并且确实那些 .so 文件不可用.任何人都可以请帮助如何摆脱.

I looked at /usr/local/apache2/modules/ and really those .so files are not available. Can anyone please help that how to get rid off.

如果我查看 /usr/local/apache2/modules/ 文件夹然后我看到:(没有 .so 文件可用)

if i look at /usr/local/apache2/modules/ folder then i see:(no .so files available)

bimlesh@server:/usr/local/apache2/bin$ ls ../modules/
httpd.exp             mod_authn_file.a        mod_cache_disk.a   mod_file_cache.a            mod_logio.la           mod_ratelimit.a        mod_socache_dbm.la
mod_access_compat.a   mod_authn_file.la       mod_cache_disk.la  mod_file_cache.la           mod_mime.a             mod_ratelimit.la       mod_socache_memcache.a
mod_access_compat.la  mod_authn_socache.a     mod_cache.la       mod_filter.a                mod_mime.la            mod_remoteip.a         mod_socache_memcache.la
mod_actions.a         mod_authn_socache.la    mod_cgid.a         mod_filter.la               mod_negotiation.a      mod_remoteip.la        mod_socache_shmcb.a
mod_actions.la        mod_authz_core.a        mod_cgid.la        mod_headers.a               mod_negotiation.la     mod_reqtimeout.a       mod_socache_shmcb.la
mod_alias.a           mod_authz_core.la       mod_dav.a          mod_headers.la              mod_proxy.a            mod_reqtimeout.la      mod_speling.a
mod_alias.la          mod_authz_dbd.a         mod_dav_fs.a       mod_include.a               mod_proxy_ajp.a        mod_request.a          mod_speling.la
mod_allowmethods.a    mod_authz_dbd.la        mod_dav_fs.la      mod_include.la              mod_proxy_ajp.la       mod_request.la         mod_status.a
mod_allowmethods.la   mod_authz_dbm.a         mod_dav.la         mod_info.a                  mod_proxy_balancer.a   mod_rewrite.a          mod_status.la
mod_auth_basic.a      mod_authz_dbm.la        mod_dbd.a          mod_info.la                 mod_proxy_balancer.la  mod_rewrite.la         mod_substitute.a
mod_auth_basic.la     mod_authz_groupfile.a   mod_dbd.la         mod_lbmethod_bybusyness.a   mod_proxy_connect.a    mod_sed.a              mod_substitute.la
mod_auth_digest.a     mod_authz_groupfile.la  mod_deflate.a      mod_lbmethod_bybusyness.la  mod_proxy_connect.la   mod_sed.la             mod_unique_id.a
mod_auth_digest.la    mod_authz_host.a        mod_deflate.la     mod_lbmethod_byrequests.a   mod_proxy_express.a    mod_session.a          mod_unique_id.la
mod_auth_form.a       mod_authz_host.la       mod_dir.a          mod_lbmethod_byrequests.la  mod_proxy_express.la   mod_session_cookie.a   mod_unixd.a
mod_auth_form.la      mod_authz_owner.a       mod_dir.la         mod_lbmethod_bytraffic.a    mod_proxy_fcgi.a       mod_session_cookie.la  mod_unixd.la
mod_authn_anon.a      mod_authz_owner.la      mod_dumpio.a       mod_lbmethod_bytraffic.la   mod_proxy_fcgi.la      mod_session_dbd.a      mod_userdir.a
mod_authn_anon.la     mod_authz_user.a        mod_dumpio.la      mod_lbmethod_heartbeat.a    mod_proxy_ftp.a        mod_session_dbd.la     mod_userdir.la
mod_authn_core.a      mod_authz_user.la       mod_env.a          mod_lbmethod_heartbeat.la   mod_proxy_ftp.la       mod_session.la         mod_version.a
mod_authn_core.la     mod_autoindex.a         mod_env.la         mod_log_config.a            mod_proxy_http.a       mod_setenvif.a         mod_version.la
mod_authn_dbd.a       mod_autoindex.la        mod_expires.a      mod_log_config.la           mod_proxy_http.la      mod_setenvif.la        mod_vhost_alias.a
mod_authn_dbd.la      mod_buffer.a            mod_expires.la     mod_log_debug.a             mod_proxy.la           mod_slotmem_shm.a      mod_vhost_alias.la
mod_authn_dbm.a       mod_buffer.la           mod_ext_filter.a   mod_log_debug.la            mod_proxy_scgi.a       mod_slotmem_shm.la
mod_authn_dbm.la      mod_cache.a             mod_ext_filter.la  mod_logio.a                 mod_proxy_scgi.la      mod_socache_dbm.a
bimlesh@server:/usr/local/apache2/bin$ 

推荐答案

运行

find / -type f -name mod_authn_core.so

或者安装 updatedb ( mlocate, slocate, findutils or sth ) 如果需要并运行

or install updatedb ( mlocate, slocate, findutils or sth ) if needed and run

updatedb

然后(或之前)

locate mod_authn_core.so

要查明这些文件是否与应有的不同,并可能使用符号链接修复位置或将文件移动到预期位置.

To find out if these files are somewere else than they should be, and possibly fix location with symbolic link or moving files where they're expected to be.

如果没有您需要的文件,您可能需要在 httpd.conf 中对其进行注释(如果是特定模块),或者(重新)安装 apache 包.我相信 mod_authn_core 应该在基本包中,而不是在单独的模块中.可能是有人盲目或意外删除了它,或者一些入侵者搞砸了系统,或者磁盘损坏或其他任何事情.

If there is no file you need, you may need to comment it in httpd.conf ( if it's specific module ), or (re)install apache package(s). I believe mod_authn_core should be in basic package, not in separate module though. Possibly someone removed it blindly or accidentally, or some intruder messed up with system, or disk got broken or whatever else.

附注.模块通常在lib"下,例如/usr/local/lib/apache2 或/usr/lib/apache2,或/usr/lib/apache2/modules 或类似的,不在/usr/local/apache2/modules 中,尽管它通常取决于包的编译..

PS. Modules usually are under "lib" e.g. /usr/local/lib/apache2 or /usr/lib/apache2, or /usr/lib/apache2/modules or similar, not in /usr/local/apache2/modules, though it usually depends on compilation of package..

你也可以运行

apache2ctl -t -D DUMP_VHOSTS

找出哪些模块被编译为共享或静态.您还应该包括有关分发的信息,并注意您是从源代码构建/安装的.

to find out what modules were compiled as shared or static. You should also include information about distribution, and note you're building/installing from source.

另外,请看这里:http://httpd.apache.org/docs/2.4/install.html#configure

这篇关于在 apachectl 开始打开共享对象文件期间:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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