unzip: command not found – Install unzip on CentOS 7 server
unzip: command not found – How to Install unzip on CentOS 7 / RHEL 7 server
Follow the below steps to install unzip command on your CentOS 7 / RHEL 7 server.
FIX:
root@server [/]# unzip maria.zip
-bash: unzip: command not found
Unzip command is used to unpack zip files. I got the above error while trying to unzip a file on my CentOS 7 server. On CentOS and Redhat servers, unzip command is provided by unzip package.
1. First you must log into your linux server as ‘root’ user
2. Check whether zip rpm package is installed or not
root@server [/]#
Unzip package in not installed on the above Linux Server.
3. Run “yum install unzip” command to install unzip package on the Linux server.
Command to install unzip: #yum install unzip
Resolving Dependencies
–> Running transaction check
—> Package unzip.x86_64 0:6.0-15.el7 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
unzip x86_64 6.0-15.el7 base 166 k
Transaction Summary
========================================================================================================================================================================
Install 1 Package
Total download size: 166 k
Installed size: 357 k
Is this ok [y/d/N]: y
Downloading packages:
unzip-6.0-15.el7.x86_64.rpm | 166 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : unzip-6.0-15.el7.x86_64 1/1
Verifying : unzip-6.0-15.el7.x86_64 1/1
Installed:
unzip.x86_64 0:6.0-15.el7
Complete!
root@server [/]# unzip
UnZip 6.00 of 20 April 2009
Unzip Command is now installed on your Linux Server.
How to download and install unzip package
1. Log into your CentOS 7 / RHEL server as ‘root’ user
2. Download unzip package from CentOS website using wget command
# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/unzip-6.0-21.el7.x86_64.rpm
3. Install the downloaded rpm file by either using yum command or rpm command
# yum install unzip-6.0-21.el7.x86_64.rpm
yum will install unzip package and the dependencies needed for unzip package.
# rpm -ivh unzip-6.0-21.el7.x86_64.rpm
If you are using rpm command, you must first install the dependencies and then install the package using rpm command.
Required dependencies :
glibc
bzip2-libs
Do not install the dependencies, if it is already installed on your server.