4

Ubuntu with php7

Error occurs when trying to use SQLite3 from php:

PHP Fatal error:  Class 'SQLite3' not found in /var/www/html/index.php on line 1

I've tried to install php7.0-sqlite3 :

$ sudo apt-get install php7.0-sqlite3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0-sqlite3
E: Couldn't find any package by regex 'php7.0-sqlite3'

Apparently the package is missing:

$ sudo apt-cache search php7.0-*
php7.0-mysql - MySQL module for PHP
php7.0-readline - readline module for PHP
php7.0-opcache - Zend OpCache module for PHP
php7.0 - server-side, HTML-embedded scripting language (metapackage)
libapache2-mod-php7.0 - server-side, HTML-embedded scripting language (Apache 2 module)
php7.0-cli - command-line interpreter for the PHP scripting language
php7.0-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
php7.0-json - JSON module for PHP
php7.0-common - documentation, examples and common module for PHP    

How to add the package ?

1 Answers1

16

Try sudo apt-get install php-sqlite3

The package was kept this way during the migration to prevent any issues with sqlite3 going past 7.1

CeFu
  • 569