Composer Update Failed无法打开共享对象文件:

时间:2017-05-19 05:40:20

标签: composer-php

我刚跑

composer update

但我得到了这个

Failed loading ./opcache.so:  ./opcache.so: cannot open shared object file: No such file or directory
    PHP Warning:  PHP Startup: Unable to load dynamic library './pdo.so' - ./pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library './calendar.so' - ./calendar.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library './ctype.so' - ./ctype.so: cannot open shared object file: No such file or directory in Unknown on line 0
   ... so on

我运行php -i并获得此

Loaded Configuration File => /etc/php/7.0/cli/php.ini
Scan this dir for additional .ini files => /etc/php/7.0/cli/conf.d
Additional .ini files parsed => /etc/php/7.0/cli/conf.d/10-opcache.ini,
/etc/php/7.0/cli/conf.d/10-pdo.ini,
/etc/php/7.0/cli/conf.d/20-calendar.ini,
/etc/php/7.0/cli/conf.d/20-ctype.ini,
... so on

我该如何解决?

先谢谢。

2 个答案:

答案 0 :(得分:1)

你的php无法找到dll。要解决它:

  • 运行php -i并在php.ini键下找到您的Loaded Configuration File位置。
  • 搜索无法加载的dll文件并找到完整路径
  • php.ini中的扩展密钥更新为完整的dll路径

例如:

extension=<path>/php_pdo_firebird.dll
extension=<path>/php_pdo_mysql.dll'
extension=<path>/php_pdo_pgsql.dll:

答案 1 :(得分:1)

作曲家在php.ini中使用/etc/php/7.0/cli/php.ini看起来就像是在解开extension_dir

只是评论,然后重新加载apache就完成了。