We are tearing our hair out! We brewed mariadb and php but continue to get errors when running php. Just a command like: php -v
Error like this:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/local/lib/php/pecl/20230831/pdo_mysql (dlopen(/usr/local/lib/php/pecl/20230831/pdo_mysql, 0x0009): tried: '/usr/local/lib/php/pecl/20230831/pdo_mysql' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/php/pecl/20230831/pdo_mysql' (no such file), '/usr/local/lib/php/pecl/20230831/pdo_mysql' (no such file)), /usr/local/lib/php/pecl/20230831/pdo_mysql.so (dlopen(/usr/local/lib/php/pecl/20230831/pdo_mysql.so, 0x0009): tried: '/usr/local/lib/php/pecl/20230831/pdo_mysql.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/php/pecl/20230831/pdo_mysql.so' (no such file), '/usr/local/lib/php/pecl/20230831/pdo_mysql.so' (no such file))) in Unknown on line 0
Tried this: pecl install pdo_mysql
The error was then:
running: make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-rootn6o3Ff/install-PDO-1.0.3" install
Installing shared extensions: /private/tmp/pear/temp/pear-build-rootn6o3Ff/install-PDO-1.0.3/usr/local/Cellar/php/8.3.7/pecl/20230831/
cp: modules/*: No such file or directory
make: * [install-modules] Error 1
This is on Sonoma OSX with PHP 8.2 We have tried reinstalling mariadb and php.
Please help.
We started again with MAMP and this worked fine. Sorry we couldn't solve this.