为 macOS 安装 imagick 时出现问题
Posted
技术标签:
【中文标题】为 macOS 安装 imagick 时出现问题【英文标题】:issues installing imagick for macOS 【发布时间】:2021-07-29 13:14:57 【问题描述】:编辑:在一些进一步的错误之后,我被困在这个:
make: *** [imagick_file.lo] Error 1
ERROR: `make' failed
据我了解,这似乎是 php 版本的兼容性问题。有没有可能解决这个问题?
我在 macOS Catalina 10.15.7 上使用 XAMPP 运行 PHP-testserver,需要安装 imagick,但遇到一些问题。
当我在终端中运行以下命令时:
pecl install imagick
...我收到一条错误消息:
WARNING: configuration download directory "/private/var/tmp/pear/download" is not writeable. Change download_dir config variable to a writeable dir to avoid this warning
downloading imagick-3.4.4.tgz ...
Starting to download imagick-3.4.4.tgz (253,434 bytes)
.....................................................done: 253,434 bytes
ERROR: failed to mkdir /usr/local/lib/php/doc/imagick/examples
我是一个绝对的初学者,所以我真的很感激,得到一些解释,如何使这项工作。非常感谢。
【问题讨论】:
【参考方案1】:试试 sudo
sudo pecl install imagick
【讨论】:
谢谢!我认为这有点帮助,但现在我得到“错误:'phpize'失败”,它还说“找不到 autoconf。请检查你的 autoconf 安装和 $PHP_AUTOCONF 环境变量。然后,重新运行这个脚本”。 你有一个权限问题,sudo 解决了。我会感谢您的支持,因此原始问题已得到解决。另一方面,您评论“错误:'phpize'失败”并编辑有关“[imagick_file.lo]”的问题。目前情况如何?你试过php.net/manual/es/imagick.requirements.php 吗?你的 PHP 版本是什么?以上是关于为 macOS 安装 imagick 时出现问题的主要内容,如果未能解决你的问题,请参考以下文章
关于MacOs python 安装tensorflow1.8版本时出现的问题及解决
在 MacOS 上为 Flutter 安装 cocoapods 时出现问题
php71-imagick 无法加载动态库(MacOS 上的 XAMPP / APACHE)
在 PyCharm (macOS) 中安装 dlib 时出现问题