我正在尝试在Mac上本地安装ImageMagick和Imagick(使用自制软件,apache和php 7.0)。我还在线阅读了其他一些问题和教程。不幸的是,许多人已经岁岁了,没有工作。这些是我运行的命令:
brew install imagemagick # Success
brew install imagick # Not found,so i'll try something else
brew install php70-imagick # Still not found. read that need to install with "pecl"
pecl install imagick # Error: No releases available for package "pecl.php.net/imagick
# Read to manually download package to desktop and install with "pear"
pear install ~/Downloads/imagick-3.4.4.tgz # Cannot install,php_dir for channel "pecl.php.net" is not writeable by the current user
sudo pear install ~/Downloads/imagick-3.4.4.tgz # It runs and asks for prefix of ImageMagick installation,I chose 'autodetect'
它运行了一段时间,然后死于:
In file included from /private/var/tmp/pear/temp/imagick/imagick_file.c:21:
/private/var/tmp/pear/temp/imagick/php_imagick.h:42:10: fatal error: 'php.h' file not found
#include "php.h"
^~~~~~~
1 error generated.
make: *** [imagick_file.lo] Error 1
ERROR: `make' failed
感谢您的帮助。
===编辑===
以下是brew配置:
$ brew config
HOMEBREW_VERSION: 2.2.10
ORIGIN: https://github.com/Homebrew/brew
HEAD: 48a1637b24a0c329905a981f4cff547c7fa47943
Last commit: 2 weeks ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 76ce3984f71e655b4f6d228351466ae610c867a5
Core tap last commit: 4 days ago
HOMEBREW_PREFIX: /usr/local
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.6.3 => /System/library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.21.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_121
macOS: 10.15.3-x86_64
CLT: 11.0.33.17
Xcode: 11.3.1