当我尝试重新启动 Apache 服务时出现以下错误:
root@localhost:/# /etc/init.d/apache2 restart
[FAIL] Restarting web server: apache2 failed!
[warn] The apache2 configtest failed. ... (warning).
Output of config test was:
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: undefined symbol: unixd_config
Action 'configtest' failed.
The Apache error log may have more information.
root@localhost:/# ls -l /etc/apache2/mods-enabled/php5.load
lrwxrwxrwx 1 root root 27 Nov 17 10:31 /etc/apache2/mods-enabled/php5.load -> ../mods-available/php5.load
root@localhost:~# apache2ctl -M
php5_module (shared) --MISSNG
root@localhost:/# apache2 -v
Server version: Apache/2.4.10
Server built: Sep 15 2016 20:44:43
root@localhost:/# php5 -v
PHP 5.6.29-1~dotdeb+7.1 (cli) (built: Dec 9 2016 16:30:46)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
采取以下行动:
root@localhost:/# apt-get install libapache2-mod-php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-php5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 290 not upgraded.
我已经关注使用 php5 模块时 Apache2 启动错误(Ubuntu 服务器)链接,但对我的情况不起作用。
有人知道吗,如何排除故障并解决此错误?
答案1
libapache2-mod-php 肯定可用这里适用于所有当前支持的 Ubuntu 版本。你的网络连接有问题或者您用来安装软件包的镜像或者也许你需要升级升级至受支持的版本。