can not find php7.2-xml or php-xml in ubuntu 14.04

by wilson Liu   Last Updated October 10, 2019 03:02 AM - source

I am using ubuntu 14.04 + nginx + php7.2

I suffered "call to undefined function simplexml_load_string()" due to xml module missing in php 7.2

When I using apt-cache search php7, only shows the following

  • php7.2-mysql - MySQL module for PHP
  • php7.2-cli - command-line interpreter for the PHP scripting language
  • php7.2-json - JSON module for PHP
  • php7.2-opcache - Zend OpCache module for PHP
  • php7.2-readline - readline module for PHP
  • php7.2-gd - GD module for PHP
  • php7.2-mbstring - MBSTRING module for PHP
  • php7.2-common - documentation, examples and common module for PHP
  • php7.2-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)

all the module is without xml related. I also try add-apt-repository ppa:ondrej/php and apt update

but still get E: Couldn't find any package by regex 'php7.2-xml'

please help, thanks

Tags : apt php nginx


Answers 1


According to packages.ubuntu.com for 16.04 (Xenial), php-xml is in the universe repository. So make sure that universe is enabled in your package manager & update the cache. You may want to consider upgrading to 16.04 as 14.04 is no longer supported.

Edit: Software sources manager in Ubuntu 19.04. May be similar in 14.04. Ubuntu Software Sources

Edit: Note that php7.0-xml is in the security repo. So make sure that security updates are enabled as well.

AntumDeluge
AntumDeluge
October 10, 2019 02:48 AM

Related Questions






Multiple websites on nginx, one IP

Updated May 02, 2016 08:01 AM