|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2019-12-03 10:09 UTC] bugs dot php dot net at mammals dot se
Description: ------------ Apple has decided to protect a lot of directories in Mac OS, starting with version 10.13.X so even superusers (sudo command) and/or root can't touch a lot of directories. This means everything must be installed in those directories that a regular user or a sudo user has access to. I.e /user/local, not /usr/inclides/php/ext/ Se here: About System Integrity Protection on your Mac OS X El Capitan and later includes security technology that helps protect your Mac from malicious software. https://support.apple.com/en-gb/HT204899 The build process for imagick starts like this: sudo pecl install imagick WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update downloading imagick-3.4.4.tgz ... And ends like this: Build process completed successfully Installing '/usr/include/php/ext/imagick/php_imagick_shared.h' ERROR: failed to mkdir /usr/include/php/ext/imagick Because /usr/includes is not somehting an installer/root/sudo has access to write to anymore. There is no way to for instance chown on thoose folder, create a folder elsewhere and copy it to that folder etc. Because of the protection. One could turn SIPS off, https://www.howtogeek.com/230424/how-to-disable-system-integrity-protection-on-a-mac-and-why-you-shouldnt/ but a way better solution is to get the installer of Imagick to install in the correct place, /usr/local where PHP already resides? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 18:00:01 2025 UTC |
Thank you very much Derick! Yes, the pecl (and pear) are here: /usr/local/php5/bin/pecl Yes, I had an old version of .pearrc in my home folder. Renamed it and a new one was created with this contents: > #PEAR_Config 0.9 > a:1:{s:10:"__channels";a:3:{s:12:"pecl.php.net";a:0:{}s:5:"__uri";a:0: > {}s:11:"doc.php.net";a:0:{}}} Tried again and added the path to the "other" pecl in the install command, like this: > $ sudo /usr/local/php5/bin/pecl install imagick Then the install process ends with this instead: > Build process completed successfully > Installing '/usr/local/php5/include/php/ext/imagick/php_imagick_shared.h' > Installing '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/imagick.so' > install ok: channel://pecl.php.net/imagick-3.4.4 > configuration option "php_ini" is not set to php.ini location > You should add "extension=imagick.so" to php.ini That did the trick. Now php-info command shows that Imagick is installed. Might be interesting: ---------------------------- Using the command pecl config-show it gives this reply to some things: > PEAR configuration file cfg_dir /Users/taz_1999/pear/cfg That is an empty folder, no hidden files either. And this: > PHP extension directory ext_dir /usr/lib/php/extensions/no-debug-non-zts-20160303 That is, it is pointing to the wrong directory (it should read php5, otherwise ok). > User Configuration File Filename /Users/(My username)/.pearrc > System Configuration File Filename /private/etc/pear.conf Using the complete path to the pecl-file, like this: /usr/local/php5/bin/pecl config-show I get this instead: > PEAR configuration file cfg_dir /usr/local/php5/lib/php/cfg That folder (/cfg) does not exist. > PHP extension directory ext_dir /usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718 This is correct. > User Configuration File Filename /Users/(my username)/.pearrc > System Configuration File Filename /usr/local/php5/etc/pear.conf This file, pear.conf, contains correct info and uses this path for most things /usr/local/php5. Thanks again! Appreciate it! Ola Andersson