Pear error "XML Extension not found" on Ubuntu 14.04 after installing php-xml & php-xml7.0

Install this list and everything will work fine :)

sudo apt-get install php-pear pkg-config libbson-1.0 libmongoc-1.0-0 php-xml php7.0-xml php-dev

On some installations, there is a bug in pecl. Find this line;

exec $PHP -C -n -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@" 

remove the -n

If you want to script it, try:

sed -i "$ s|\-n||g" /usr/bin/pecl

Was Facing this issue, i just needed to install php-xml

sudo apt-get install php-xml

Credits: Taha EL BOUFFI

Full Explanation as to why can be found here