2

When updating the composer it gives this error:

$ composer update
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php/20180731/pdo_mysql.so (/usr/lib/php/20180731/pdo_mysql.so: undefined symbol: pdo_parse_params), /usr/lib/php/20180731/pdo_mysql.so.so (/usr/lib/php/20180731/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Fatal error:  Uncaught Error: Class 'Phar' not found in /usr/local/bin/composer.phar:23
Stack trace:
#0 {main}
  thrown in /usr/local/bin/composer.phar on line 23

How to fix?

karel
  • 13,706

1 Answers1

0

It appears that PHP's pdo_mysql is missing.

Try and install pdo_mysql with apt:

sudo apt install php{7.0/7.1/7.2/7.3}-mysql

Sorry for the late re-response, this was the first question I answered on SuperUser and I havent had this issue yet.