0

I am trying install a laravel installation via composer on Ubuntu 16.04, now while doing so I am getting an error:

 To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.2/cli/php.ini
    - /etc/php/7.2/cli/conf.d/10-mysqlnd.ini
    - /etc/php/7.2/cli/conf.d/10-opcache.ini
    - /etc/php/7.2/cli/conf.d/10-pdo.ini
    - /etc/php/7.2/cli/conf.d/15-xml.ini
    - /etc/php/7.2/cli/conf.d/20-calendar.ini
    - /etc/php/7.2/cli/conf.d/20-ctype.ini
    - /etc/php/7.2/cli/conf.d/20-curl.ini
    - /etc/php/7.2/cli/conf.d/20-dom.ini
    - /etc/php/7.2/cli/conf.d/20-exif.ini
    - /etc/php/7.2/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.2/cli/conf.d/20-ftp.ini
    - /etc/php/7.2/cli/conf.d/20-gd.ini
    - /etc/php/7.2/cli/conf.d/20-gettext.ini
    - /etc/php/7.2/cli/conf.d/20-iconv.ini
    - /etc/php/7.2/cli/conf.d/20-json.ini
    - /etc/php/7.2/cli/conf.d/20-mbstring.ini
    - /etc/php/7.2/cli/conf.d/20-mysqli.ini
    - /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/7.2/cli/conf.d/20-phar.ini
    - /etc/php/7.2/cli/conf.d/20-posix.ini
    - /etc/php/7.2/cli/conf.d/20-readline.ini
    - /etc/php/7.2/cli/conf.d/20-shmop.ini
    - /etc/php/7.2/cli/conf.d/20-simplexml.ini
    - /etc/php/7.2/cli/conf.d/20-sockets.ini
    - /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.2/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.2/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.2/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.2/cli/conf.d/20-wddx.ini
    - /etc/php/7.2/cli/conf.d/20-xmlreader.ini
    - /etc/php/7.2/cli/conf.d/20-xmlwriter.ini
    - /etc/php/7.2/cli/conf.d/20-xsl.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

I was having php-7.0 version and I updated to php-7.2 version. I did installations to these also:

sudo apt-get install php7.2-fpm php7.2-curl php7.2-mysql php7.2-gd php7.2-xml php7.2-mcrypt php7.2-mbstring php7.2-iconv

I guess something is missing for installation.

Help me out with this. Thanks

Nitish Kumar
  • 6,054
  • 21
  • 82
  • 148
  • Try logout and login. And then google around https://stackoverflow.com/questions/35815376/to-enable-extensions-verify-that-they-are-enabled-in-those-ini-files-vagrant – Kyslik Jul 31 '18 at 08:08
  • I recommend you use xampp to avoid these kinds of errors. – Rahul Jul 31 '18 at 08:08
  • have you removed php7.0? – treyBake Jul 31 '18 at 08:11
  • 2
    @RahulShrivastava I have always used ubuntu and I can assure you I have never gotten these errors – apokryfos Jul 31 '18 at 08:11
  • The first few ones are easy. You need to install PDO and mysqlnd (different from mysql) and enable opcache (I don't think it's enabled by default). Most of the others though are supposed to be extensions which are enabled by default so it's odd that they need enabling. At any rate `phpenmod` might help here – apokryfos Jul 31 '18 at 08:13
  • Read the [server requirements](https://laravel.com/docs/5.6/installation#server-requirements) for Laravel and install/enable all those extensions. – brombeer Jul 31 '18 at 08:26
  • 2
    silly note but your install string does not actually install php7.2 only extensions for php 7.2 – apokryfos Jul 31 '18 at 08:46

1 Answers1

-3
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2-cli 

and so on

service nginx restart # or service apache2 restart
treyBake
  • 6,440
  • 6
  • 26
  • 57
TsV
  • 629
  • 4
  • 7