更新作曲家時出現此錯誤:
$ 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 上回答的第一個問題,我還沒有遇到這個問題。