我对使用服务器计算机还很陌生,时不时会遇到一些问题需要解决,但这也是学习的乐趣之一。
现在我正在尝试建立一个 wordpress 网站,但是在配置 wordpress 网站后,apache2 似乎不想重新加载。
当我使用 systemctl status apache2.service 时,我收到以下响应:
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Fri 2017-04-28 14:49:40 CEST; 10min ago
Docs: man:systemd-sysv-generator(8)
Process: 56053 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Apr 28 14:49:40 ubuntuServerAlex apache2[56053]: *
Apr 28 14:49:40 ubuntuServerAlex apache2[56053]: * The apache2 configtest failed.
Apr 28 14:49:40 ubuntuServerAlex apache2[56053]: Output of config test was:
Apr 28 14:49:40 ubuntuServerAlex apache2[56053]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/authz_svn.load: Syntax error on line 6 of /etc/apache2/mods-enabled/dav_svn.load: Cannot load /usr/lib/apache2/modules/mod_dav_svn.so into server: /usr/lib/apache2/modules/mod_dav_svn.so into server: /usr/lib/apache2/modules/mod_dav_svn.so: cannot open shared object file: No such file or directory
Apr 28 14:49:40 ubuntuServerAlex apache2[56053]: Action 'configtest' failed.
Apr 28 14:49:40 ubuntuServerAlex apache2[56053]: The Apache error log may have more information.
Apr 28 14:49:40 ubuntuServerAlex systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 28 14:49:40 ubuntuServerAlex systemd[1]: Failed to start LSB: Apache2 web server.
Apr 28 14:49:40 ubuntuServerAlex systemd[1]: apache2.service: Unit entered failed state.
Apr 28 14:49:40 ubuntuServerAlex systemd[1]: apache2.service: Failed with result 'exit-code'.
有人知道这是什么问题以及我该如何解决它吗?
答案1
您的 apache 无法加载模块。因此无法启动
mod_dav_svn.so: cannot open shared object file: No such file or directory
尝试更新/升级
sudo apt-get update
sudo apt-get upgrade libapache2-svn
或者
sudo apt-get update
sudo apt-get upgrade