Drupal - Installation error with Composer

Please make sure your webserver (nginx/apache) is using the same PHP version as your cli one. For example, you may encounter this issue if your cli PHP version is PHP 7.1 and your webserver is using PHP 7.0.


For Ubuntu 16.04 I had to run the following commands to adjust the PHP version used by Apache:

sudo a2dismod php7.0
sudo a2enmod php7.2
sudo service apache2 restart

I removed all php dependencies:

sudo apt-get remove php*

I installed php again:

sudo apt-get install php7.1 php7.1-cli php7.1-common libapache2-mod-php7.1 php7.1-mysql php7.1-fpm php7.1-curl php7.1-gd php7.1-bz2 php7.1-mcrypt php7.1-json php7.1-tidy php7.1-mbstring php-redis php-memcached

Restarted Apache

sudo service apache2 restart

There is the installation screen!