Yum error php-pecl-zip requires: libzip.so.4
Error Requires: libzip.so.4
Error: Package: php-pecl-zip-1.13.2-1.el6.remi.5.6.i686 (remi-php56)
Requires: libzip.so.4
I got the above error on my linux server when I tried to install PHP version 5.6 on webmin server using remi repository. Error shows “libzip.so.4” is required for package “php-pecl-zip”. Do the below steps to fix the dependency issue.
FIX :
1. Log into your Linux server via SSH as ‘root’ user
2. Type the command “rpm -qa | grep libzip” to check whether the package is installed
[root@server ~]# rpm -qa | grep libzip
[root@server ~]#
If the above commands shows no output then it means libzip is not installed on the server. On the above server you can see that package libzip is not installed.
3. Install epel repository by running the command “yum install epel-release”
[root@server ~]# yum install epel-release
You can also install epel repository using rpm file.
4. Go to “/etc/yum.repos.d/” directory and make sure EPEL repo is enabled
Open epel.repo file using vi editor and change “enabled=0” to “enabled=1”
Save the file and exit vi editor
5. Run the command “yum install libzip” to install libzip
[root@server yum.repos.d]# yum install libzip
Resolving Dependencies
–> Running transaction check
—> Package libzip.x86_64 0:0.10.1-1.3.amzn1 will be installed
–> Finished Dependency Resolution
Is this ok [y/d/N]: y
Downloading packages:
libzip-0.10.1-1.3.amzn1.x86_64.rpm | 47 kB 00:00
Running transaction
Installing : libzip-0.10.1-1.3.amzn1.x86_64 1/1
Verifying : libzip-0.10.1-1.3.amzn1.x86_64 1/1
Installed:
libzip.x86_64 0:0.10.1-1.3.amzn1
Complete!
===========================
6. Run the command “yum install libzip-devel” to install “libzip-devel”
–> Running transaction check
—> Package libzip-devel.x86_64 0:0.10.1-1.3.amzn1 will be installed
–> Finished Dependency Resolution
Total download size: 75 k
Installed size: 72 k
Is this ok [y/d/N]: y
Installing : libzip-devel-0.10.1-1.3.amzn1.x86_64 1/1
Verifying : libzip-devel-0.10.1-1.3.amzn1.x86_64 1/1
Installed:
libzip-devel.x86_64 0:0.10.1-1.3.amzn1
Complete!
You can also install libzip-devel by downloading rpm from rpmfind.net
Link to download libzip-devel is pasted below :
http://rpmfind.net/linux/rpm2html/search.php?query=libzip-devel
7. Next install “libzip-last” package by downloading rpm
Type “uname -i” to check the architecture and type “cat /etc/redhat-release” to check the OS release. Download “libzip-last” package from below url :
x86_64
[root@root ~]# cat /etc/redhat-release
CentOS release 6.8 (Final)
https://www.rpmfind.net/linux/rpm2html/search.php?query=libzip-last
RHEL 7 / CENTOS 7 64 bit can download the below rpm :
ftp://195.220.108.108/linux/remi/enterprise/7/remi/x86_64/libzip-last-1.1.2-1.el7.remi.x86_64.rpm
RHEL 6 / CENTOS 6 64 bit users can download the below rpm :
ftp://195.220.108.108/linux/remi/enterprise/6/remi/x86_64/libzip-last-1.1.2-1.el6.remi.x86_64.rpm
8. Use wget to download “libzip-last”
wget ftp://195.220.108.108/linux/remi/enterprise/7/remi/x86_64/libzip-last-1.1.2-1.el7.remi.x86_64.rpm
9. Install “libzip-last” using rpm -Uvh command
rpm -Uvh ftp://195.220.108.108/linux/remi/enterprise/7/remi/x86_64/libzip-last-1.1.2-1.el7.remi.x86_64.rpm
Now libzip-last is installed on your server and you will not face any issues while installing “php-pecl-zip” on the server.