Reputation: 468
I have been trying to install pdo_pgsql. Homebrew is not working. Adminer needs this extension for accessing the DB. How to solve the issue?
PgSQL and PDO_PgSQL extensions are already enabled on the php.ini file. But, still, Adminer shows the Error:
None of the supported PHP extensions (PgSQL, PDO_PgSQL) are available.
When running $ php artisan serve, it shows the following error
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /opt/homebrew/lib/php/pecl/20190902/pdo_pgsql (dlopen(/opt/homebrew/lib/php/pecl/20190902/pdo_pgsql, 9): image not found), /opt/homebrew/lib/php/pecl/20190902/pdo_pgsql.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/pdo_pgsql.so, 9): image not found)) in Unknown on line 0
Upvotes: 6
Views: 1491
Reputation: 2191
A bit late on this one, but in case anyone happens across it, I'll answer it anyway.
Managing PHP on MacOS with homebrew can be a bit of a pain, but it can be made easier.
I've answered this question in great detail here, but to summarise:
brew tap shivammathur/php
brew install shivammathur/php/[email protected]
)brew link
The PHP versions available through that tap include pgsql if I'm not mistaken.
For other extensions:
brew tap shivammathur/extensions
brew install [email protected]
Upvotes: 1