How to Install RAR/UnRAR on CentOS Linux


The rar and unrar packages are not available from the default yum repositories on CentOS Linux so you will need to install the rpmforge repo to install these packages via yum. Read this article for steps on how to install the RPMforge repository on CentOS Linux. Once installed you can install rar and unrar using the syntax below.

Error Attempting To Use rar:
[root@localhost ~]# rar
-bash: rar: command not found

You might get the above error when attempting to use rar on CentOS which can be resolved by installing the rpmforge repository and then installing rar as noted below.

Install rar On CentOS Linux:

Requirement: install RPMforge repository

Use following command
yum install rar

Result:

[root@localhost ~]# yum install rar
Loaded plugins: fastestmirror, protectbase, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.transip.nl
* extras: centos.mirror.transip.nl
* rpmforge: mirror.nl.leaseweb.net
* updates: centos.mirror.transip.nl
rpmforge | 1.9 kB 00:00
rpmforge/primary_db | 7.1 MB 00:00
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rar.i386 0:3.8.0-1.el5.rf set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
rar i386 3.8.0-1.el5.rf rpmforge 264 k

Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)

Total download size: 264 k
Is this ok [y/N]: y
Downloading Packages:
rar-3.8.0-1.el5.rf.i386.rpm | 264 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : rar 1/1

Installed:
rar.i386 0:3.8.0-1.el5.rf

Complete!

Install unrar On CentOS Linux:

Requirement: install RPMforge repository

Use following command
yum install unrar

Result:

[root@localhost ~]# yum install unrar
Loaded plugins: fastestmirror, protectbase, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.transip.nl
* extras: centos.mirror.transip.nl
* rpmforge: mirror.nl.leaseweb.net
* updates: centos.mirror.transip.nl
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package unrar.i386 0:4.2.3-1.el5.rf set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
unrar i386 4.2.3-1.el5.rf rpmforge 123 k

Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)

Total download size: 123 k
Is this ok [y/N]: y
Downloading Packages:
unrar-4.2.3-1.el5.rf.i386.rpm | 123 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : unrar 1/1

Installed:
unrar.i386 0:4.2.3-1.el5.rf

Complete!

Using unrar on Linux is easy however it is also easy to get the switches mixed up. Make sure if you want to keep the directory structure that you use “unrar x” instead of “unrar e”. You now have access to use rar and unrar on your CentOS server.

Recent search terms:

  • unrar on linux
  • unrar online
  • online unrar

Leave a Reply