升级到MacOS Mojave后,Apache无法再加载PHP扩展。任何扩展名,我都会在Apache日志中收到以下错误;苹果似乎在MacOS Mojave上通过Apache实现了库验证。这显然使得无法使用Apache加载未签名的二进制文件。
是否有不涉及禁用MacOS的SIP的变通办法?
Failed loading //usr/local/php/extensions/xdebug.so: dlopen(//usr/local/php/extensions/xdebug.so, 9): no suitable image found. Did find:
//usr/local/php/extensions/xdebug.so: code signature in =(//usr/local/php/extensions/xdebug.so)
not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned?
Code has to be at least ad-hoc signed.
//usr/local/php/extensions/xdebug.so: stat() failed with errno=22
答案 0 :(得分:0)
更新Mojave之后,我的iTunes库中的某些视频文件出现问题,需要第三方音频插件。它触发了完全相同的错误消息。我最终找到了禁用它的简单方法。 https://github.com/mologie/macos-disable-library-validation
我只运行了它,一切正常,甚至不必重新启动。为了安全起见,我会自担风险,但希望它能起作用!