sudo apt-get install unrar-free
if not, try unrar-nonfree by following the instruction next:
A,
- Uninstall
unrar-free
.$ sudo apt-get remove unrar-free
- Make sure you have a source repository by editing
/etc/apt/sources.list
.$ cat /etc/apt/sources.list # Default repository deb http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi # Source repository to add deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
- Sync the apt database.
$ sudo apt-get update
- Create a working directory and move into it. The
unrar-nonfree
command will be built in this directory.$ mkdir ~/unrar-nonfree && cd ~/unrar-nonfree
- Install the dependencies required by
unrar-nonfree
.$ sudo apt-get build-dep unrar-nonfree
- Download the
unrar-nonfree
sources and build the.deb
package.$ sudo apt-get source -b unrar-nonfree
- Install the generated
.deb
package. Its name varies depending on the version ofunrar-nonfree
.$ sudo dpkg -i unrar*.deb
- You can remove the working directory you created in
4.
.$ cd && rm -r ~/unrar-nonfree
Once installed, you can use either unrar
or unrar-nonfree
(unrar
is a simlink to unrar-nonfree
).
Warning: unrar-nonfree
and unrar-free
options are different. For instance, to extract an archive:
$ # with unrar-free
$ unrar -x my_archive.part01.rar
$ # with unrar-nonfree
$ unrar e my_archive.part01.rar
Please man unrar-nonfree
for more details.
B,
$ cd /tmp
$ wget http://www.rarlab.com/rar/rarlinux-3.9.3.tar.gz
$ tar -zxvf rarlinux-3.9.3.tar.gz
$ cd rar
$ ./unrar
$ cp rar unrar /bin