5

I wanted to install rar from packages ( https://packages.ubuntu.com/search?keywords=unrar ), unfortunately it seems that it is impossible on Raspbian:

pi@raspberrypi:~ $ rar
bash: rar: command not found
pi@raspberrypi:~ $ sudo apt install unrar
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package unrar is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'unrar' has no installation candidate
pi@raspberrypi:~ $ sudo apt install rar
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package rar is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'rar' has no installation candidate
pi@raspberrypi:~ $ 

Is it necessary to install from source due to lack of build for Pi or is there an alternative?

2

1 Answer 1

10

You can unpack RAR files with 7-zip.

Install that with sudo apt install p7zip p7zip-full

Use 7z e my_rar_file to extract the contents. NOTE: 7z can't create rar files.

1
  • came across this answer and put me on the right path. I seemed to already have the above packages installed, which I don't think I did, but I found that I also had to do sudo apt-get install p7zip-rar to get unzipping a rar to not throw out errors. After installing this, I could extract the rar properly. I also found that using 7z x my_rar_file kept the folders for the archive in tact.
    – andyface
    Commented Jul 13, 2022 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.