bunzip2 command not found – How to Install bunzip2
ERROR : -bash: bunzip2 command not found
root@server [~]# bunzip2 -z test.php
-bash: bunzip2 command not found
I got ‘bunzip2 command not found’ error on my centOS 7 server. On CentOS 7 and RHEL 7 servers, bunzip2 command is provided by bzip2 package. The package might not be installed on your Linux server.
How to Install bunzip2 On Linux Server
1. Log into your Linux Server via SSH as root user
2. “rpm -qa | grep bzip2” command will show whether required package is installed or not.
bzip2 package was not installed on my centos server.
3. Install bzip2 package on your server using yum command
root@server [~]#
root@server [~]# yum install bzip2
Resolving Dependencies
--> Running transaction check
---> Package bzip2.x86_64 0:1.0.6-13.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
bzip2 x86_64 1.0.6-13.el7 base 52 k
Transaction Summary
========================================================================================================================================================================
Install 1 Package
Total download size: 52 k
Installed size: 82 k
Is this ok [y/d/N]: y
Downloading packages:
bzip2-1.0.6-13.el7.x86_64.rpm | 52 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : bzip2-1.0.6-13.el7.x86_64 1/1
Verifying : bzip2-1.0.6-13.el7.x86_64 1/1
Installed:
bzip2.x86_64 0:1.0.6-13.el7
Complete!
root@server [~]#
Now bunzip2 is installed on the server. Now you can try compressing and decompressing files using bunzip2
4. Run the following command to verify installation by checking bunzip2 version
root@server [~]# bunzip2 –version
bzip2, a block-sorting file compressor. Version 1.0.6, 6-Sept-2010.
root@server [~]# bzip2 –version
bzip2, a block-sorting file compressor. Version 1.0.6, 6-Sept-2010.
How to download and install bzip2 rpm on CentOS 7 server
1. Log into CentOS 7 server or Redhat 7 via SSH as ‘root’ user
2. Download bzip2 rpm file from CentOS website using wget command
3. You can install the downloaded package either using yum command or rpm command.
yum command will install the required dependencies.
You must download and install the required dependencies if you are installing using rpm command.