Mengatasi Error Install Laravel "You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode"



Mengatasi Error Install Laravel "You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode"

Ane cerita dulu ya. Wkwkwk. Di semester 4 tuh ada mata kuliah FRAMEWORK. Nah di situ kampus ane make framework Laravel. Mulai dari situ tuh ane mulai cari cari apa itu Laravel.

Apa itu Laravel. Laravel adalah salah satu framework PHP yang dibangun dengan konsep MVC(Model View Controller). MVC maksutnya memisahkan komponen aplikasi berdasarkan Model(struktur data), View(bagian tampilan), dan Controller(yang menghubngkan antara Model dan View). Laravel dirilis dibawah lisensi MIT. 

Mungkin seperti itulah pengertian laravel. Untuk Menginstall laravel bisa lihat caranya di sini.

Nah pada saat menginstall laravel itu terjadi eror seperti gambar dibawah ini.


Setelah ane identifikasi ternyata masalahnya ada di sini

Problem 1
- laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v2.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for laravel/installer ^2.0 -> satisfiable by laravel/installer[v2.0.0, v2.0.1].


Ane sih nangkepnya kalo si laravel installer butuh ext-zip atau extensi PHP zip nya belum terinstall di laptop ane.

Disini ane menggunakan OS LINUX MINT 19 XFCE

nah cara mengatasi masalah tersebut gampang banget. Caranya :

Buka Terminal dulu. Lalu ketikkan

  1. Update dulu dengan 

    Sudo apt-get update

  2. lalu ketikkan

    sudo apt-get install php7.2-zip
    *php7.2 itu bisa di ganti dengan versi php kalian.
     
  3. setelah itu lanjutkan menginstall Laravel dengan Laravel installer

Nah mungkin seperti itu cara mengatasi error

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

Problem 1
- laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v2.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for laravel/installer ^2.0 -> satisfiable by laravel/installer[v2.0.0, v2.0.1].

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-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-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-intl.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-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.

Installation failed, deleting ./composer.json.

Gimana Mudah bukan ??

Komentar