Archive August 2024


PHP PECL module install fix Warning: mkdir(): File exists in System.php

I wanted to install imagick (Image Magick) pecl module on my local machine.

I've tried with

$ pecl install imagick

but I got the following error

Build process completed successfully
Installing '/opt/homebrew/Cellar/[email protected]/8.1.29/include/php/ext/imagick/php_imagick_shared.h'
Installing '/opt/homebrew/Cellar/[email protected]/8.1.29/pecl/20210902/imagick.so'

Warning: mkdir(): File exists in System.php on line 294
PHP Warning:  mkdir(): File exists in /opt/homebrew/Cellar/[email protected]/8.1.29/share/[email protected]/pear/System.php on line 294

Warning: mkdir(): File exists in /opt/homebrew/Cellar/[email protected]/8.1.29/share/[email protected]/pear/System.php on line 294
ERROR: failed to mkdir /opt/homebrew/Cellar/[email protected]/8.1.29/pecl/20210902