![如何解决“apache2 configtest 失败”?](https://linux22.com/image/1139438/%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%E2%80%9Capache2%20configtest%20%E5%A4%B1%E8%B4%A5%E2%80%9D%EF%BC%9F.png)
当我启动 apache2 服务时出现此错误:
* The apache2 configtest failed.
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: cannot open shared object file: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
我在 ubuntu 14.04 64bit 上运行它。我该如何解决?
答案1
检查是否/usr/lib/apache2/modules/libphp5.so
存在且具有 644 的权限 ( sudo chmod 644 /usr/lib/apache2/modules/libphp5.so
) 并且由 root:root 所有 ( sudo chown root:root /usr/lib/apache2/modules/libphp5.so
)。