Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Warning: PHP Startup: Unable to load dynamic library

When I run this command php -v
this error comes up:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/dom.so' - /usr/lib/php/20160303/dom.so: undefined symbol: php_libxml_node_free_list in Unknown on line 0

PHP Warning: PHP Startup: Unable to 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: PHP Startup: 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 The 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, by Zend Technologies

like image 686
Scott Wang Avatar asked Jul 16 '17 19:07

Scott Wang


1 Answers

I found almost the same problem with xml after linux update (and PHP 7.0 -> 7.1 with it).

The solution for me was pretty simple:

sudo apt install php7.1-xml
like image 122
Dmitry Sichev Avatar answered Oct 07 '22 15:10

Dmitry Sichev