If you’re running apache2, you can try to install the missing PHP module using the following command:
sudo apt-get install php7.1-mysql
If the system is unable to locate this package then it’s simply not available in the repositories that you have configured on the server.
If this is the case you can enable the Ondrej PHP repository by typing:
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
Then you can try to install PDO again:
sudo apt install php7.1-pdo
If you’re still having issues, then my suggestion will be to check this article on DigitalOcean’s website and check the PHP part of it. Everything is explained really well and you should be able to sort this out:
Let me know how it goes.
A "LAMP" stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This stack typically consists of the Linux operating system, the Apache web server, a MySQL database, and PHP, a dynamic content processor. This tutorial serves as a guide for installing these components on an Ubuntu 18.04 server.