How can I .rar compress files in shell?

I needed to uncompress different kinds of extensions through shell, like .zip (p7zip-full), .rar (unrar-free)

But for the opposite (compresion) I'm having trouble finding proper commands. For RAR it says there is no candidate.

$ sudo apt install -y --install-recommends 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

And as p7zip-full suggested me while installing to also install p7zip-rar

$ sudo apt install -y --install-recommends p7zip-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages: p7zip-rar
The following NEW packages will be installed: p7zip-full
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 993 kB of archives.
After this operation, 3,943 kB of additional disk space will be used.

Then I tried to install it too.

$ sudo apt install -y --install-recommends p7zip-rar
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package p7zip-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 'p7zip-rar' has no installation candidate

Surprise, there is no candidate for it too.

RAR is a private extension, is that the reason why is so difficult to find proper command to compress with it? And if that`s the case then how can I .rar compress files in shell?

EDIT: 1 PS: Answering @steeldriver, here the state of my sources.listenter image description here

Is there a missing multiverse reference?

2

1 Answer

Lately i've been able to use command rar to compress files in shell. Dunno if it was an update period of the package which led it to be unavailable.

Thanks Novice for the RAR Archive Ubuntu. guide

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like