18

I need the package rar. But I get this error whenever I try to install it:

Reading package Lists... Done
Building dependency tree
Reading state information... Done
Package rar ist not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available form another source
E: package 'rar' has no installation candidate.

What must I do to get rar?

2
  • Have you tried an apt-cache search rar and see the results?
    – Ander2
    Jan 17, 2013 at 11:03
  • 2
    @Ander2 apt-cache policy rar is better ;)
    – Rinzwind
    Jan 17, 2013 at 11:13

4 Answers 4

23

Install with the following commands,

sudo apt-get install unrar-free

2
17

rar is provided in the multiverse component, so you must enable that repository. To do this, open up the Software Sources window in any of three ways:

  • Press Alt+F2 and run software-properties-gtk. (Use software-properties-kde instead if this is a Kubuntu system.)
  • Open the Software Updater (or Update Manager, in older releases) and click Settings... at the lower-left corner of the window.
  • Open the Software Center and go to Edit > Software Sources....

Software Sources window showing Ubuntu Software tab with mouse pointer hovering over checkbox label for multiverse repository component

In the Ubuntu Software tab of the Software Sources window, under **Downloadable from the Internet*, one of the checkboxes is:

  • Software restricted by copyright or legal issues (multiverse)

Check that box. You may be prompted for your password, to make the change. After you've done so and the box has a check in it, click Close to close the Software Sources window. Now try installing again.

(If it still doesn't work and you're installing from the Terminal with apt-get, try running apt-get update then attempting the installation again.)

How to find software with "no installation candidate"?

To find out why you might not have been able to install rar, the first thing I did was to go to packages.ubuntu.com and search for it.

Searching for the rar package, in all currently supported releases.
Searching for rar in all supported releases (can also search one specific release).

The results revealed it to be in the multiverse component.

Search results for rar (searching in all non-EoL releases).

2
  • add in the apt-cache policy rar and I can remove my answer ;)
    – Rinzwind
    Jan 17, 2013 at 11:13
  • @Rinzwind I think your answer is also good; in my opinion, they should both exist. (I was going to upvote it, when I get more votes.) Anyway, it's your call. Feel free to edit that into my answer if you like. (If nothing happens for a while I'll probably edit it to include at least a mention of that command.) Jan 17, 2013 at 11:14
5

Package rar exists in multiverse: http://packages.ubuntu.com/quantal/rar

Multiverse is a non-free repositorie so... make sure you enable it/have it enabled.

apt-cache policy rar tells you where to find it:

$ apt-cache policy rar
rar:
  Installed: (none)
  Candidate: 1:3.7.1-1
  Version table:
     1:3.7.1-1 0
        500 http://nl.archive.ubuntu.com hardy/multiverse Packages
1
  • apt-cache policy packagename reports the software sources that are already configured to provide the package. Can it be used to tell someone where to find a package that it's provided by any currently enabled repository? Jan 18, 2013 at 0:11
0

Try this, it worked for me:

wget http://ftp.us.debian.org/debian/pool/non-free/r/rar/rar_5.5.0-1_amd64.deb

dpkg -i rar_5.5.0-1_amd64.deb

apt-get install -f
1
  • Did you confirm that all dependencies are in place, since you installed a Debian binary? Jan 3, 2023 at 15:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .