I have been having an issue in my server for a while now. My php keeps returning a warning
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php/20170718/pdo_pgsql (/usr/lib/php/20170718/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/pdo_pgsql.so (/usr/lib/php/20170718/pdo_pgsql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Anytime this error is returned, my server request fails and hence my system fail.
I cannot install anything using apt or dpkg because all packages are broken. I don’t know how to fix this issue and any ideas or guide will be appreciated.
I currently run php 7.2 and I believe this issue started when I wanted to install php 7.3 and it failed. Apache server, Yii2 framework
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @abebohmuzikol,
Can you try removing your pdo_pgsql PHP driver with apt to see if that would work first:
apt remove pdo_pgsql
or
apt remove php-pgsql
You might need to add the version are using 7.3
apt remove php73-pgsql
You must properly install the PostgreSQL module and enable it. (http://php.net/manual/en/pgsql.installation.php)[PHP PHSQL installation]
P.S. do not use ‘.dll’ files on the servers with UNIX based OS, because these extensions are compiled for the Windows operating system (for UNIX based OS you must use ‘.so’ files).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.