doufen3134 2017-04-18 14:44
浏览 139

为什么apache不是从新安装的PHP7开始的?

macOS Sierra comes with PHP 5.6 and I wanted to upgrade it to the latest stable version of PHP (7.1.4) by building from the source. What I did was actually a fresh install. First, I removed the old PHP from my system and then download the source code from the php.net and built it. Things work fine except for Apache.

By the way, before I built the PHP, I had to install apr and apr-util packages. The PHP 7 didn't just accept the same packages under the /usr/lib which come with OS by default.

When I execute configtest, I receive this error:

httpd: Syntax error on line 175 of /private/etc/apache2/httpd.conf:
Cannot load libexec/apache2/libphp7.so into server:
dlopen(/usr/libexec/apache2/libphp7.so, 10):
Library not loaded: /usr/local/apr/lib/libaprutil-1.0.dylib
Referenced from: /usr/libexec/apache2/libphp7.so
Reason: Incompatible library version:
libphp7.so requires version 6.0.0 or later, but libaprutil-1.0.dylib provides version 4.0.0

For some reason, libaprutil-1.0.dylib is not loaded into my environment under /usr/local/apr/lib/ and that's why I cannot start Apache.

I saw similar problem here and tried to do the accepted solution. However, I still couldn't manage to start it.

Any ideas why it cannot load libaprutil?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信小程序协议怎么写
    • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
    • ¥20 怎么用dlib库的算法识别小麦病虫害
    • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
    • ¥15 java写代码遇到问题,求帮助
    • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
    • ¥15 有了解d3和topogram.js库的吗?有偿请教
    • ¥100 任意维数的K均值聚类
    • ¥15 stamps做sbas-insar,时序沉降图怎么画
    • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看