04 Oct 2019

Centos 8 install libzip

Ceritanya lagi coba install lumen di centos 8. Baru mau install aja ternyata udah ada yang error seperti di bawah ini:

[root@bagus html]# composer global require "laravel/lumen-installer"
Changed current directory to /root/.config/composer

Installation failed, deleting ./composer.json.
[root@teach html]# composer global require "laravel/lumen-installer"
Changed current directory to /root/.config/composer
Using version ^1.1 for laravel/lumen-installer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for laravel/lumen-installer ^1.1 -> satisfiable by laravel/lumen-installer[v1.1.0].
- laravel/lumen-installer v1.1.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.

To enable extensions, verify that they are enabled in your .ini files:
- /etc/opt/remi/php73/php.ini
- /etc/opt/remi/php73/php.d/10-opcache.ini
- /etc/opt/remi/php73/php.d/20-bz2.ini
- /etc/opt/remi/php73/php.d/20-calendar.ini
- /etc/opt/remi/php73/php.d/20-ctype.ini
- /etc/opt/remi/php73/php.d/20-curl.ini
- /etc/opt/remi/php73/php.d/20-dom.ini
- /etc/opt/remi/php73/php.d/20-exif.ini
- /etc/opt/remi/php73/php.d/20-fileinfo.ini
- /etc/opt/remi/php73/php.d/20-ftp.ini
- /etc/opt/remi/php73/php.d/20-gettext.ini
- /etc/opt/remi/php73/php.d/20-iconv.ini
- /etc/opt/remi/php73/php.d/20-json.ini
- /etc/opt/remi/php73/php.d/20-mbstring.ini
- /etc/opt/remi/php73/php.d/20-mysqlnd.ini
- /etc/opt/remi/php73/php.d/20-pdo.ini
- /etc/opt/remi/php73/php.d/20-pgsql.ini
- /etc/opt/remi/php73/php.d/20-phar.ini
- /etc/opt/remi/php73/php.d/20-simplexml.ini
- /etc/opt/remi/php73/php.d/20-sockets.ini
- /etc/opt/remi/php73/php.d/20-sqlite3.ini
- /etc/opt/remi/php73/php.d/20-tokenizer.ini
- /etc/opt/remi/php73/php.d/20-xml.ini
- /etc/opt/remi/php73/php.d/20-xmlwriter.ini
- /etc/opt/remi/php73/php.d/20-xsl.ini
- /etc/opt/remi/php73/php.d/30-mcrypt.ini
- /etc/opt/remi/php73/php.d/30-mysqli.ini
- /etc/opt/remi/php73/php.d/30-pdo_mysql.ini
- /etc/opt/remi/php73/php.d/30-pdo_pgsql.ini
- /etc/opt/remi/php73/php.d/30-pdo_sqlite.ini
- /etc/opt/remi/php73/php.d/30-wddx.ini
- /etc/opt/remi/php73/php.d/30-xmlreader.ini
- /etc/opt/remi/php73/php.d/50-mysql.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.

Kalo baca di error nya ternyta lavarel lumen butuh modul zip :

laravel/lumen-installer v1.1.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.

Nah ketauan kan error nya, ya udah kita coba install aja modulnya..

[root@Bagus html]# yum install php73-php-zip

Last metadata expiration check: 0:20:04 ago on Fri 04 Oct 2019 10:34:32 AM WIB.
Error:
Problem: package php73-php-pecl-zip-1.15.5-1.el8.remi.x86_64 requires libzip(x86-64) >= 1.5.1, but none of the providers can be installed
- package php73-php-pecl-zip-1.15.5-1.el8.remi.x86_64 requires libzip.so.5()(64bit), but none of the providers can be installed
- cannot install the best candidate for the job
- package libzip-1.5.1-1.module_el8.0.0+56+d1ca79aa.x86_64 is excluded
- package libzip-1.5.1-1.el8.remi.x86_64 is excluded
- package libzip-1.5.2-1.el8.remi.x86_64 is excluded
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Eh udah di install malah masih error lagi… doi bilang modul libzipnya nggak ada.. nah default repo centos 8 sepertinya belum ada untuk library libzipnya.. Terus untuk cara instalasinya gimana?. Nah, cara instalasinya kita harus download manual file rpm nya di website ini http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/libzip-1.5.1-1.module_el8.0.0+56+d1ca79aa.x86_64.rpm

[root@Bagus html]# wget http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/libzip-1.5.1-1.module_el8.0.0+56+d1ca79aa.x86_64.rpm

Kemudian lakukan instalasi :

[root@Bagus html]# rpm -Uvh libzip-1.5.1-1.module_el8.0.0+56+d1ca79aa.x86_64.rpm
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:libzip-1.5.1-1.module_el8.0.0+56+################################# [100%]

Setelah instalasi libzip selesai, baru install kembali modul php-zip nya :

[root@Bagushtml]# yum install php73-php-zip
Last metadata expiration check: 0:31:27 ago on Fri 04 Oct 2019 10:34:32 AM WIB.
Dependencies resolved.
=============================================================================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================================================================
Installing:
php73-php-pecl-zip x86_64 1.15.5-1.el8.remi remi-safe 50 k

Transaction Summary
=============================================================================================================================================================================================================================================
Install 1 Package

Total download size: 50 k
Installed size: 117 k
Is this ok [y/N]: y
Downloading Packages:
php73-php-pecl-zip-1.15.5-1.el8.remi.x86_64.rpm 68 kB/s | 50 kB 00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 24 kB/s | 50 kB 00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : php73-php-pecl-zip-1.15.5-1.el8.remi.x86_64 1/1
Running scriptlet: php73-php-pecl-zip-1.15.5-1.el8.remi.x86_64 1/1
Verifying : php73-php-pecl-zip-1.15.5-1.el8.remi.x86_64 1/1

Installed:
php73-php-pecl-zip-1.15.5-1.el8.remi.x86_64

Complete!

Okkay, sudah selesai installasi module php-zip nya. Selanjutnya kita install kembali laravelnya :

[root@Bagus html]# composer global require "laravel/lumen-installer"
Changed current directory to /root/.config/composer
^[[AUsing version ^1.1 for laravel/lumen-installer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 12 installs, 0 updates, 0 removals
- Installing symfony/process (v4.3.4): Downloading (100%)
- Installing psr/container (1.0.0): Downloading (100%)
- Installing symfony/service-contracts (v1.1.6): Downloading (100%)
- Installing symfony/polyfill-php73 (v1.12.0): Downloading (100%)
- Installing symfony/polyfill-mbstring (v1.12.0): Downloading (100%)
- Installing symfony/console (v4.3.4): Downloading (100%)
- Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
- Installing ralouphie/getallheaders (3.0.3): Downloading (100%)
- Installing psr/http-message (1.0.1): Downloading (100%)
- Installing guzzlehttp/psr7 (1.6.1): Downloading (100%)
- Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)
- Installing laravel/lumen-installer (v1.1.0): Downloading (100%)
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/event-dispatcher
symfony/console suggests installing symfony/lock
symfony/console suggests installing psr/log (For using the console logger)
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
guzzlehttp/guzzle suggests installing psr/log (Required for using the Log middleware)
Writing lock file
Generating autoload files
[root@Bagus html]#

Nah installasi lumennya sekarang telah selesai di install.

Leave a Reply