Unable to load dynamic library pgsql, undefined symbol

Description:

After updating php and related libraries (in this case most importantly php-pgsql) to 8.4.3-1, the PostgreSQL modules do not work anymore. Relevant command line output:

% php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php/modules/pdo_pgsql (/usr/lib/php/modules/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/modules/pdo_pgsql.so (/usr/lib/php/modules/pdo_pgsql.so: undefined symbol: PQclosePrepared)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pgsql' (tried: /usr/lib/php/modules/pgsql (/usr/lib/php/modules/pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/modules/pgsql.so (/usr/lib/php/modules/pgsql.so: undefined symbol: PQchangePassword)) in Unknown on line 0
PHP 8.4.3 (cli) (built: Jan 15 2025 08:09:27) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.3, Copyright (c) Zend Technologies

Additional info:

  • package version(s):
    • php 8.4.3-1
    • php-pgsql 8.4.3-1
  • config and/or log files:
    • /etc/php/php.ini contains extension=pdo_pgsql and extension=pgsql
  • link to upstream bug report, if any:

Steps to reproduce:

  1. Install or update php and php-pgsql version 8.4.3-1
  2. Enable pdo_pgsql and pgsql extensions in /etc/php/php.ini
  3. Run php -v
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information