更新作曲家时出错

更新作曲家时出错

更新作曲家时出现以下错误:

$ 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

怎么修?

答案1

看起来 PHPpdo_mysql缺失了。

pdo_mysql尝试使用 apt安装:

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

抱歉这么晚才回复,这是我在 SuperUser 上回答的第一个问题,我还没有遇到过这个问题。

相关内容