14

I'm sorry to ask this, but all of the questions along similar lines I could find have been answered by installing unrar/7zip.

So, I received a book in the form of a .rar archive of jpegs. Initially, I tried to uncompress with 7zip from terminal. It goes through each file in the archive and for each file in the archive, says,

Extracting   cover.jpg     Unsupported Method

After doing some quick googling, I thought it was due to lack of .rar codecs, as it's not technically freeware or somesuch. After installing unrar, from the terminal I run

unrar -x Books.rar

And it goes through and just says "Failed" in the place of 7zip's "Unsupported Method."

I thought it could be a corrupt file or something, so I had a friend compress a random jpg as .rar and send it to me, and I encountered the same program. Double clicking it opens unroller, which then promptly closes.

Any help would be much appreciated.

Shopin
  • 141

4 Answers4

17

Execute following command in terminal :

sudo apt-get install unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller

Then extract any rar file.

Edit : rar is provided in the multiverse component, so you must enable that repository.

Faizan Akram Dar
  • 4,569
  • 1
  • 25
  • 31
9

Complement your installation of 7zip with p7zip-rar, the non-free rar module for p7zip:

sudo apt-get install p7zip-rar

toliveira
  • 389
3

You can download the latest version off winrar for linux on their website.

Then extract it with the following command (this is not a rar archive fortunately)

tar xvf rarlinux-x64-6.0.2.tar.gz

It creates a folder named rarin which there is an executable of the same name. You can use it to decompress your archive.

For example if your archive is in the same folder as the rar folder.

./rar/rar x Books.rar

Remark: you may need to allow execution on the rar executable with chmod a+x rar/rar.

0

You have to install some non-free packages.

On my Raspberry Pi running Raspbian I did the following:

  1. Uncomment the deb-src line in /etc/apt/sources.list

    deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
    
  2. Update

    # apt update && apt upgrade
    
  3. Install unrar-nonfree

    # apt-get build-dep unrar-nonfree
    # apt-get source -b unrar-nonfree
    # sudo dpkg -i unrar_5.6.6-1_armhf.deb
    
  4. Install p7zip-rar

    Download the last version from https://packages.debian.org/buster/armhf/p7zip-rar and then run the following:

    # apt install ./p7zip-rar_16.02-3_armhf.deb