PHP Warning: starting PHP: unable to load dynamic library

When I run this command php -v
this error occurs:

PHP Warning: starting PHP: cannot load dynamic library / usr / lib / php / 20160303 / dom.so '- / usr / lib / php / 20160303 / dom.so: undefined character: php_libxml_node_free_list in Unknown on line 0

PHP Warning: starting PHP: cannot load dynamic library / usr / lib / php / 20160303 / xmlreader.so '- / usr / lib / php / 20160303 / xmlreader.so: undefined symbol: dom_node_class_entry in Unknown on line 0

PHP Warning: starting PHP: unable to load dynamic library '/usr/lib/php/20160303/xsl.so' - / usr / lib / php / 20160303 / xsl.so: undefined symbol: dom_node_class_entry in Unknown on line 0
PHP 7.1. 5-1 + deb.sury.org ~ trusty + 2 (cli) (built: May 22, 2017 13:39:01) (NTS)

Copyright (c) 1997-2017 PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.7-1 + ubuntu14.04.1 + deb.sury.org + 1, Copyright (c) 1999-2017, Zend Technologies

+4
source share
5 answers

A safe solution is to reinstall all php7 related packages.

You can do this by simply entering this command in the console:

sudo apt-get install --reinstall `dpkg -l | grep 'ii  php7' | awk '{ printf($2" "); next}'`

This solution will not change your configuration.

+51

( ubuntu 14.04 )

sudo apt-get install libapache2-mod-php7.0 libphp7.0-embed libssl-dev openssl php7.0-cgi php7.0-cli php7.0-common php7.0-dev php7.0-fpm php7.0-phpdbg

:

https://gnh1201.wordpress.com/2017/07/24/php-7-0-undefined-symbol-php_libxml_node_free_list/

+7

. , , , PHP .

, PHP .

  • PHP Debian/Ubuntu (, PHP):

    sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
    

    : https://askubuntu.com/a/187278

  • , PHP:

    php -v
    

    - " : php".

  • PHP, :

    sudo apt-get install php7.1 php7.1-xml php7.1-fpm php7.1-json
    
0

xml linux ( PHP 7.0 → 7.1).

:

sudo apt install php7.1-xml
0

php , dist-upgrade:

sudo apt-get dist-upgrade
-1

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


All Articles