Error Composer Update could not open the shared objects file:

I just run

composer update

but i got it

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

I ran php -iand got this

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

How to fix it?

Thanks at Advance.

+4
source share
2 answers

Use of the composer php.iniin the /etc/php/7.0/cli/php.inilooks you inconsistentextension_dir

just a comment and reload apache and you did it.

+1
source

Your php cannot find the dll. To solve this problem:

  • Run php -iand find < php.iniin the section Loaded Configuration File.
  • Search php dll files cannot load and find full path
  • Update the extension key in php.inito the full path to the dll

eg:

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

Source: https://habr.com/ru/post/1677508/


All Articles