I'm trying to get the php imagick extension installed on a Mac with High Sierra 10.13.5.
I have PHP 7.2 installed through brew and PEAR 1.10.5 installed. When trying to install imagick using sudo pecl install imagick
I get:
Build process completed successfully
Installing '/usr/include/php/ext/imagick/php_imagick_shared.h'
ERROR: failed to mkdir /usr/include/php/ext/imagick
It looks like I'm hitting the Mac permissions where the install directory should be in /usr/local
but I cant figure out how to change it. Any ideas how to fix this?
In the end I needed PHP 7.1 not 7.2 but I still had the same problem.
Not sure if all of the steps I took were necessary but here's how I got around it:
php-config
/usr/lib/php/extensions/no-debug-non-zts-20160303)
to the equivalent in /usr/local
so in my case to /usr/local/lib/php/extensions/no-debug-non-zts-20160303
extensions_dir
to the new directory in /usr/local
./phpize
./configure
make
/usr/local
equivalent. make install
imagick.so
to the extensions section It seems to be working for me now but this probably isn't the easiest way to go about getting it installed.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.