Imagick on PHP 8 Apple M1 Pro

Hello,

I’m new user of localwp.
Overall it works very well.
I’m running a site with php 8.0.2

I have two debug line when running cli command :

Failed loading /Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/xdebug.so:  dlopen(/Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/xdebug.so, 0x0009): tried: '/Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/xdebug.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/xdebug.so' (no such file), '/Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/xdebug.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

Warning: PHP Startup: Unable to load dynamic library '/Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/imagick.so' (tried: /Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/imagick.so (dlopen(/Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/imagick.so, 0x0009): tried: '/Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/imagick.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/imagick.so' (no such file), '/Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/imagick.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))), /opt/homebrew/Cellar/php@8.0/8.0.26/lib/php/20200930//Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/imagick.so.so (dlopen(/opt/homebrew/Cellar/php@8.0/8.0.26/lib/php/20200930//Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/imagick.so.so, 0x0009): tried: '/opt/homebrew/Cellar/php@8.0/8.0.26/lib/php/20200930//Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/imagick.so.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/php@8.0/8.0.26/lib/php/20200930//Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/imagick.so.so' (no such file), '/opt/homebrew/Cellar/php@8.0/8.0.26/lib/php/20200930//Users/aksld/Library/Application Support/Local/lightning-services/php-8.0.22+6/bin/darwin/lib/php/extensions/no-debug-non-zts-20200930/imagick.so.so' (no such file))) in Unknown on line 0

in php.ini.hbs I disabled the loading of imagick and xdebug and no more warning.

I specify that to enter in shell, i execute the following command in my term :

/Users/aksld/Library/Application\ Support/Local/ssh-entry/FZvZV7QBF.sh;

Thanks for help !

@aksld I had to delete and then re-install Local on my M1 Mac. I also reinstalled PHP using brew reinstall php, which helped solve some library-related issues I was experiencing.
I’m not sure if that will help, but wanted to offer my advice.

Deleting and installing Local won’t erase any sites you have pulled.

Hi all - this isn’t a bug with Local; rather, PHP 8 and PHP 8.1 haven’t been compiled with Imagick and that line in the terminal is expected.

I’m going to move this thread out of the “Bugs” category - instead, if you’d like to add detail to the feature request or vote, you can do so here! Imagick on Mac with M1 Chip

2 Likes

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.