I have an application in symfony using doctrine and PGSQL.
I'm using MacOsx BigSur.
When I run my projet I have this error:
PHP Startup: Unable to load dynamic library 'pgsql.so'
I have install php@7.3 with brew install php@7.3
In the /etc/php.ini I added the line extension=pgsql.so
of the end of file.
I have restart my services with: brew services restart php@7.3
When I run php -v I have a warning : PHP Startup: Unable to load dynamic library 'pgsql.so'
And when I run my symfony application I have this error:
In AbstractPostgreSQLDriver.php line 79:
An exception occurred in driver: could not find driver
In PDOConnection.php line 31:
could not find driver
In PDOConnection.php line 27:
could not find driver
How can I install pgsql to run my application correctly ?
Thanks
To resolve my problem I have installed php@7.3 with brew
brew install php@7.3
After that you need to do:
echo ‘export PATH=“/usr/local/opt/php@7.3/bin:$PATH”’ >> ~/.profile
echo ‘export PATH=“/usr/local/opt/php@7.3/sbin:$PATH”’ >> ~/.profile
You can run again and that's work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.