6

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?

  • 1
    If your issue still actual, please provide output of `phpbrew --debug ext install pdo_sqlite` and `phpbrew info | grep sqlite` after reloading apache service. – mrDinkelman Jan 28 '18 at 10:50

3 Answers3

8

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

Community
  • 1
  • 1
Sam Shaba
  • 349
  • 2
  • 5
3

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.

Noohone
  • 694
  • 5
  • 12
2

In ubuntu 16.04, just do:

sudo apt-get install php-sqlite3
sudo service apache2 restart
cd symfony-demo/
php bin/console server:run

It works for me

NaN
  • 7,441
  • 6
  • 32
  • 51
UIT CODE
  • 21
  • 2