LAMP PHP configuration
Try following command:
sudo apt-get install php-mbstring
sudo apt-get install php-xml
Sometimes the problem is the php-xml extension.
Try:
sudo apt-get install php-xml
If still facing the issue then try
sudo apt-get install -y php7.1 php7.1-xml php7.1-mysql php7.1-curl php7.1-mbstring