brew install libgd
// then or
cpan install GD
Apr 20, 2021
7
Level 6
Shell error with imagick
I just wanted to install ImageMagick with PHP 8 on my local machine. But I spend the last couple of hours trying to fix errors with brew and valet and boy oh boy – I could just set everything on fire right now!
Basically, I re-installed and re-everythinged a few times now but still end up with the following error when I run valet install.
Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/pecl/20200930/imagick.so (dlopen(/usr/local/lib/php/pecl/20200930/imagick.so, 9): Library not loaded: /usr/local/opt/imagemagick/lib/libMagickWand-7.Q16HDRI.7.dylib
Referenced from: /usr/local/lib/php/pecl/20200930/imagick.so
Reason: image not found), /usr/local/lib/php/pecl/20200930/imagick.so.so (dlopen(/usr/local/lib/php/pecl/20200930/imagick.so.so, 9): image not found)) in Unknown on line 0
Could not open input file:
Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/pecl/20200930/imagick.so (dlopen(/usr/local/lib/php/pecl/20200930/imagick.so, 9): Library not loaded: /usr/local/opt/imagemagick/lib/libMagickWand-7.Q16HDRI.7.dylib
Referenced from: /usr/local/lib/php/pecl/20200930/imagick.so
Reason: image not found), /usr/local/lib/php/pecl/20200930/imagick.so.so (dlopen(/usr/local/lib/php/pecl/20200930/imagick.so.so, 9): image not found)) in Unknown on line 0
Parse error: syntax error, unexpected identifier "imagick", expecting ")" in Command line code on line 2/cli/valet.php
I don't know why it says "imagick.so.so" and I don't know why valet.php complains about an expecting ) there. I haven't even touched that file.
Anybody have some idea what could be wrong and how to fix this?
Oh and the folder 20200930 did not contain the image, but I copied the one from my PHP 7.4 folder, so it is not empty.
Please or to participate in this conversation.