mac下通过brew 安装的php,可能使用了 --debug 标识,php命令行时,一直出现 "Unable to initialize module"
2017-03-14 06:39
639 查看
mac通过brew安装php,以及php模块,一致出现一个 "Unable to initialize module"。也一直不知道什么原因,一直放着。今天,看laravel的图像依赖包“intervention”,想使用 "imagick" 图像库,发现就是这个问题导致加载不了imagick,只有google了。发现下面这个地址,以前没注意:
https://github.com/Homebrew/homebrew-php/issues/1743
解释了:
If you compile PHP with debug, you'll have to install extensions from source as well.
一旦我们安装php时,使用了 "--debug",就应该从源代码来安装扩展,而不是从"bintray binary" 来安装。
brew 默认是从 "bintray binary" 来安装的,我们在安装时,可传入 "-fs" 参数,来从源代码来安装
brew remove php71-imagick
brew install php71-imagick -fs
总结:
有时间,可以看看上面的地址,应该就是brew来支持php安装的官方文档
https://github.com/Homebrew/homebrew-php/issues/1743
解释了:
If you compile PHP with debug, you'll have to install extensions from source as well.
一旦我们安装php时,使用了 "--debug",就应该从源代码来安装扩展,而不是从"bintray binary" 来安装。
brew 默认是从 "bintray binary" 来安装的,我们在安装时,可传入 "-fs" 参数,来从源代码来安装
brew remove php71-imagick
brew install php71-imagick -fs
总结:
有时间,可以看看上面的地址,应该就是brew来支持php安装的官方文档
相关文章推荐
- Mac上使用命令行安装brew,并通过brew安装Ant等工具
- Mac上使用命令行安装brew,并通过brew安装Ant等工具
- 使用PHP中的库函数file_get_contents时出现Unable to find the wrapper "https"错误解决
- MAC - 使用 brew 安装东西时出现 curl: (7) Failed connect to downloads.sf.net:443; Operation timed out 的解决办法
- Mac上使用命令行安装brew,并通过brew安装Ant等工具
- 使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
- 使用不同版本XCode出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
- ubuntu 11.04使用apt-get安装软件时一直提示E:unable to locate package的解决办法
- 使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
- PHP通过cURL访问https时出现SSL certificate problem: unable to get local issuer certificate的解决方法
- (转)使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
- Linux运行qt出现错误:(qtdemo:3694): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
- 使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
- 【转】ubuntu 11.04使用apt-get安装软件时一直提示E:unable to locate package
- 使用dsoframer控件出现"Unable to display the inactive document. Click here to reactivate the document."的问题
- 解决安装svn后出现Unable to connect to a repository at URL以及"认证失败"
- 使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
- 使用dsoframer控件出现"Unable to display the inactive document. Click here to reactivate the document."的问题
- iOS 使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module