我从Debian Wheezy到Jessie的apt-get dist-upgrade并保留了我的LAMP堆栈的配置文件,现在我在尝试启动Apache时遇到以下错误:(我在这里完全被困住了为什么apache \ cloudflare模块没有加载?)
root@county:~# /etc/init.d/apache2 restart
[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
failed!
root@county:~# systemctl status apache2.service -l
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: failed (Result: exit-code) since Thu 2015-07-16 20:58:34 EDT; 21s ago
Process: 2166 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jul 16 20:58:34 county systemd[1]: Starting LSB: Apache2 web server...
Jul 16 20:58:34 county apache2[2166]: Starting web server: apache2 failed!
Jul 16 20:58:34 county apache2[2166]: The apache2 configtest failed. ... (warning).
Jul 16 20:58:34 county apache2[2166]: Output of config test was:
Jul 16 20:58:34 county apache2[2166]: apache2: Syntax error on line 244 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/cloudflare.load: Cannot load /usr/lib/apache2/modules/mod_cloudflare.so into server: /usr/lib/apache2/modules/mod_cloudflare.so: undefined symbol: ap_log_rerror
Jul 16 20:58:34 county apache2[2166]: Action 'configtest' failed.
Jul 16 20:58:34 county apache2[2166]: The Apache error log may have more information.
Jul 16 20:58:34 county systemd[1]: apache2.service: control process exited, code=exited status=1
Jul 16 20:58:34 county systemd[1]: Failed to start LSB: Apache2 web server.
Jul 16 20:58:34 county systemd[1]: Unit apache2.service entered failed state.
root@county:~# journalctl -xn
-- Logs begin at Thu 2015-07-16 20:51:26 EDT, end at Thu 2015-07-16 20:59:02 EDT. --
Jul 16 20:59:01 county CRON[2208]: pam_unix(cron:session): session closed for user root
Jul 16 20:59:01 county CRON[2206]: pam_unix(cron:session): session closed for user root
Jul 16 20:59:01 county CRON[2209]: pam_unix(cron:session): session closed for user root
Jul 16 20:59:01 county CRON[2211]: pam_unix(cron:session): session closed for user root
Jul 16 20:59:01 county CRON[2203]: pam_unix(cron:session): session closed for user root
Jul 16 20:59:01 county CRON[2201]: pam_unix(cron:session): session closed for user root
Jul 16 20:59:01 county CRON[2207]: pam_unix(cron:session): session closed for user root
Jul 16 20:59:02 county CRON[2202]: pam_unix(cron:session): session closed for user root
Jul 16 20:59:02 county CRON[2200]: pam_unix(cron:session): session closed for user root
Jul 16 20:59:02 county CRON[2204]: pam_unix(cron:session): session closed for user root
Cloudflare.load包含以下内容:
LoadModule cloudflare_module /usr/lib/apache2/modules/mod_cloudflare.so
mod_cloudflare.so来自https://github.com/cloudflare/mod_cloudflare
更新:问题不仅仅是Cloudflare。
Jul 16 22:27:41 county apache2[1674]: apache2: Syntax error on line 265 of /etc/apache2/apache2.conf: Could not open configuration...irectory
Jul 16 22:27:41 county apache2[1674]: Action 'configtest' failed.
Jul 16 22:27:41 county apache2[1674]: apache2: Syntax error on line 265 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/: No such file or directory
Jul 16 22:29:18 county apache2[1963]: AH00526: Syntax error on line 89 of /etc/apache2/apache2.conf:
Jul 16 22:29:18 county apache2[1963]: Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration
我的apache2.conf(从Wheezy升级到Jessie后,我甚至无法获得版本号[最新版本],因为我收到有关此配置的错误消息):
答案 0 :(得分:0)
你修改/etc/apt/sources.list.d/cloudflare-main.list用jessie替换wheezy这个词吗? 如果您不更改此文件,您将获得旧版本的软件包构建,而不是当前稳定的debian版本。 所以,在/etc/apt/sources.list.d/cloudflare-main.list上输入jessie而不是wheezy,运行
apt-get update
然后
apt-get upgrade