Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony demo app install fails - pdo_sqlite missing

I am trying to use the Symfony 4 demo application https://github.com/symfony/demo but when I install it with composer I get the error described below. I am using Ubuntu 16.04 and php 7.1 installed via phpbrew.

My steps are as follows:

$ cd /var/www/html
$ phpbrew use php-7.1.13
$ sudo php composer.phar create-project symfony/symfony-demo

which yields this error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
- The requested PHP extension ext-pdo_sqlite * is missing from your system. Install or enable PHP's pdo_sqlite extension.

if I check which extensions are loaded:

$ phpbrew extension

I get

Loaded extensions:
...
[*] pdo_sqlite

so it appears that extension is loaded.

What am I doing wrong please?

like image 406
ChrisTaylorDeveloper Avatar asked Jan 21 '18 23:01

ChrisTaylorDeveloper


2 Answers

just do:

sudo apt-get install php5-sqlite

In ubuntu 16.04 there is no php5-sqlite. You need:

sudo apt-get install php7.0-sqlite

sudo service apache2 restart

like image 153
Sam Shaba Avatar answered Sep 21 '22 14:09

Sam Shaba


Symfony on Google Cloud App Engine standard environment for PHP 7.2

Following this tutorial.

It worked like this :

sudo apt-get install php7.2-sqlite
sudo apt-get install php7.2-mbstring
composer update
cd my_symfony_directory
php bin/console server:run

The installation of sqlite & mbstring it depends on the version of PHP you are using.

like image 27
Noohone Avatar answered Sep 20 '22 14:09

Noohone