OSX Sonoma fresh brew of mariadb, php unable to load pdo-mysql

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



MacBook Pro 15″, macOS 12.5

Posted on May 21, 2024 5:53 PM

Reply
2 replies

OSX Sonoma fresh brew of mariadb, php unable to load pdo-mysql

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.