Why isn't a PDO driver detected on the install page? I have an old Drupal 7 project and I need to set it up on my localhost.
I have Ubuntu 16.04, Apache 2, php 7.0, and MySQL 5.7 installed.
Everything is working fine for other PHP scripts, But when I tried to install Drupal 7 project, I got this error.

Your web server does not appear to support any common PDO database extensions. Check with your hosting provider to see if they support PDO (PHP Data Objects) and offer any databases that Drupal supports.

I could not figure it out why Drupal doesn't detect PDO. How can I fix this issue?
The error could be thrown for three different reasons.

Some of the Drupal core files in the includes/database directory are missing
There isn't any extension implementing the necessary PDO drivers
The extension implementing the necessary PDO driver isn't enabled in the php.ini file or other .ini files used from PHP

To check which database driver is available, Drupal first looks for its own files in the includes/database directory, initializes an instance of a class that extends DatabaseTasks (for example DatabaseTasks_mysql for MySQL) and calls its installable() method.
public function installable() {
  return $this-&gt;hasPdoDriver() &amp;&amp; empty($this-&gt;error);
}

protected function hasPdoDriver() {
  return in_array($this-&gt;pdoDriver, PDO::getAvailableDrivers());
}

If the method returns FALSE, the PDO driver is considered not available. (See drupal_get_database_types() for details.)
Notice that, if the PDO extension (not a PDO driver) isn't available, the error shown from Drupal is the following one.

'Your web server does not appear to support PDO (PHP Data Objects). Ask your hosting provider if they support the native PDO extension.

In that case, Drupal would also show the following message, followed by a list of one or more missing PHP extensions.

Drupal requires you to enable the PHP extensions in the following list (see the system requirements page for more information)