Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

cannot run unrar non-free

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
windrunner
Posts: 12
Joined: 2008-03-01 16:12

cannot run unrar non-free

#1 Post by windrunner »

For some reason I cannot use unrar (non-free) which I installed. Whenever I type unrar my system uses the free version. I know this because when I type:

Code: Select all

unrar -V
it displays:
unrar 0.0.1
which is the version of the free unrar that I had installed previously.

Just to give a little background on this situation... I first installed unrar free but could not uncompress any rar files. Then I learned of the non-free unrar. So I installed it through synaptic package manager. But when the unrar command still did not work for me and I learned through the above version checking that I was still running the free version I uninstalled it (also through Synaptic). After that I again checked the version I was running and still it displayed the free version. I then even uninstalled and reinstalled unrar non-free but still whenever I checked the version it was unrar 0.0.1.

Synaptic tells me the version of unrar non-free that I have installed is:
1:3.5.4-1.1 (which is also the "latest version")
So how do I get the unrar non-free to run?

User avatar
izar
Posts: 1714
Joined: 2007-01-01 18:34
Location: Euskal Herria

#2 Post by izar »

Try purging both packages and then install the one that works for you.
You can also use apt-get:

Code: Select all

apt-get remove --purge package-name

User avatar
rickh
Posts: 3434
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

#3 Post by rickh »

On my system, unrar is handled by "alternatives"

Alternatives is well worth learning how to use.
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97

windrunner
Posts: 12
Joined: 2008-03-01 16:12

#4 Post by windrunner »

izar, I purged both unrar packages and installed the unrar (non-free) to no avail. When I run unrar it still somehow uses the free version! :?

Also, when I purged both unrar packages and then typed unrar in the terminal it ran the unrar free version. I have no idea why unrar-free is still on my system.

rickh, thanks for the tip. I read up on the "Debian alternatives system" - sounds interesting, but right now I just want to uncompress my files.

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

#5 Post by Issyer »

windrunner wrote:izar, I purged both unrar packages and installed the unrar (non-free) to no avail. When I run unrar it still somehow uses the free version! :?
How can it use anything, when unrar-free's executable is /usr/bin/unrar-free according to this:
http://packages.debian.org/etch/i386/un ... e/filelist

and unrar non-free's one is /usr/bin/unrar according to tho this:
http://packages.debian.org/etch/ia64/unrar/filelist
?
Also, when I purged both unrar packages and then typed unrar in the terminal it ran the unrar free version. I have no idea why unrar-free is still on my system.
Sure unrar is free even if it is non-free.

User avatar
izar
Posts: 1714
Joined: 2007-01-01 18:34
Location: Euskal Herria

#6 Post by izar »

windrunner wrote:izar, I purged both unrar packages and installed the unrar (non-free) to no avail. When I run unrar it still somehow uses the free version! :?

Also, when I purged both unrar packages and then typed unrar in the terminal it ran the unrar free version. I have no idea why unrar-free is still on my system.
Check /usr/bin to see if either or both of the files "unrar" and "unrar-free" exist. That should tell you if the purging process did its job.

windrunner
Posts: 12
Joined: 2008-03-01 16:12

#7 Post by windrunner »

I have unrar in /usr/bin. So then this is the non-free one? Then how come when I do unrar -V to get its version it says:
unrar 0.0.1
And in synpatic for unrar under installed and latest version it says:
1:3.5.4-1.1
And for unrar-free under latest version it says:
1:0.0.1+cvs20060609-1
:?:

Anyways, if this unrar is the non-free one then it does not work for me either - it fails when trying to uncompress the file. I dunno, maybe the file I'm trying to uncompress is corrupted or somethin :( In any case thanks for your help.

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

#8 Post by Issyer »

windrunner wrote:Then how come when I do unrar -V to get its version it says:
unrar 0.0.1
Tell us what debian you are running and how you installed unrar. And show your /etc/apt/sources.list.

Mine is OK on Etch:

Code: Select all

unrar -V 

UNRAR 3.51 freeware 

User avatar
izar
Posts: 1714
Joined: 2007-01-01 18:34
Location: Euskal Herria

#9 Post by izar »

This is what I get for unrar-free
apt-cache policy unrar-free
unrar-free:
Installed: 1:0.0.1+cvs20060609-1
Candidate: 1:0.0.1+cvs20060609-1
Version table:
*** 1:0.0.1+cvs20060609-1 0
500 http://ftp.de.debian.org etch/main Packages
100 /var/lib/dpkg/status
but then when I do: unrar-free -V I get:
unrar 0.0.1
It looks weird, but at least in my case it works.
You should beware of the unrar package you use as unrar-free
can't handle archives in the RAR 3.0 format, only the non-free "unrar" package can do that.

User avatar
rickh
Posts: 3434
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

#10 Post by rickh »

What's the output of
# update-alternatives --config unrar
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97

windrunner
Posts: 12
Joined: 2008-03-01 16:12

#11 Post by windrunner »

Issyer, I am using Debian Release: 2.6.18-4-686. I installed unrar as per the instructions on this page:

http://mrtextminer.wordpress.com/2007/1 ... bian-etch/

I installed unrar and unrar-free as Etch. Here are the contents of my /etc/apt/sources.list:
#
# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20070407-11:29]/ etch contrib main

deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20070407-11:29]/ etch contrib main

deb http://debian.yorku.ca/debian/ etch main
deb-src http://debian.yorku.ca/debian/ etch main

deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib

deb http://mirrors.kernel.org/debian etch main non-free
izar, yes I am aware that unrar-free does not handle archives in the RAR 3.0 format.

rickh, the output of:

Code: Select all

update-alternatives --config unrar
is:
No alternatives for unrar.

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

#12 Post by Issyer »

windrunner wrote:Issyer, I am using Debian Release: 2.6.18-4-686. I installed unrar as per the instructions on this page
I guess this tutorial is wrong. You can try to put into your sources list

Code: Select all

deb http://ftp.us.debian.org/debian/ etch main contrib non-free
Then run:

Code: Select all

apt-get update
upt-get install unrar

User avatar
rickh
Posts: 3434
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

#13 Post by rickh »

No alternatives for unrar
Simple enough ... You don't have it installed ... Add non-free to your sources list.
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97

User avatar
izar
Posts: 1714
Joined: 2007-01-01 18:34
Location: Euskal Herria

#14 Post by izar »

rickh wrote:
No alternatives for unrar
Simple enough ... You don't have it installed ... Add non-free to your sources list.
I get exactly the same message "No alternatives for unrar" and I can assure you that unrar is installed:
apt-cache policy unrar
unrar:
Installed: 1:3.5.4-1.1
Candidate: 1:3.5.4-1.1
Version table:
*** 1:3.5.4-1.1 0
500 http://ftp.de.debian.org etch/non-free Packages
100 /var/lib/dpkg/status
A simpler explanation for the message might just be that there are no two packages that deal with the unrar command, so there are no alternatives to choose from. But I might be wrong there.

User avatar
rickh
Posts: 3434
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

#15 Post by rickh »

I get exactly the same message "No alternatives for unrar" and I can assure you that unrar is installed ... A simpler explanation for the message might just be that there are no two packages that deal with the unrar command, so there are no alternatives to choose from.

Code: Select all

debian64:~# update-alternatives --config unrar

There is only 1 program which provides unrar
(/usr/bin/unrar-nonfree). Nothing to configure.
debian64:~#
I only have one package installed. Maybe the Etch version of Alternatives just doesn't give as good a message. Etch is pretty obsolete for home desktops, IMO.

I still don't think the OP has "non-free" installed because his sources list doesn't include the non-free repos.
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

#16 Post by Issyer »

rickh wrote: Etch is pretty obsolete for home desktops, IMO.
Etch can't be "pretty obsolete" for desktops. I run it and the latest possible software, newer than in Sid. Moreover, Etch is the only latest official Debian release. Other ones are not releases.
rickh wrote:I still don't think the OP has "non-free" installed because his sources list doesn't include the non-free repos.
Actually he has.
deb http://mirrors.kernel.org/debian etch main non-free
The choice is strange, of course, but not incorrect. I've just checked this mirror. It does contain unrar
Package: unrar
Priority: optional
Section: non-free/utils
Installed-Size: 216
Maintainer: Martin Meredith <mez@ubuntu.com>
Architecture: i386
Source: unrar-nonfree
Version: 1:3.5.4-1.1
So, I guess, the list of packages is OK. That's why the OP has no problems to see them in synaptic. But during installation something weird is being fetched from the repos and installed instead of the real unrar.
I used this Canadian yorku mirror too until something (I don't remember now what exactly) weird similar to that happened, and I switched to ftp.us.debian.org which is OK.

windrunner
Posts: 12
Joined: 2008-03-01 16:12

#17 Post by windrunner »

Thanks for all your replies, really appreciate it :)

OK, so I replaced the line I added to sources.list when following the mentioned tutorial, with the one Issyer suggested:

Code: Select all

deb http://ftp.us.debian.org/debian/ etch main contrib non-free
And then I ran:

Code: Select all

apt-get update
apt-get install unrar
Here is the output from my terminal from the latter command:

Code: Select all

debian:~# apt-get install unrar
Reading package lists... Done
Building dependency tree... Done
unrar is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
debian:~# unrar -V
unrar 0.0.1
debian:~#  
So from this it looks like I do have unrar non-free already installed. But when I execute unrar the free one runs... even though it's not supposed to exist as per synaptic showing I do not have it installed.

Hmmm... Is there maybe a manual way I can get rid of unrar-free and unrar? Like going to the directory where the executables are located and deleting them? Or will this just screw up my system?

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

#18 Post by Issyer »

Try

Code: Select all

whereis unrar
If it shows anything like /usr/bin/unrar, run

Code: Select all

/usr/bin/unrar -V
It sounds like your unrar is a symlink to /usr/bin/unrar-free. And this is weird. Try also

Code: Select all

whereis unrar-free
Try also

Code: Select all

locate unrar
and post.
It's something weird that you have there.
Try also

Code: Select all

apt-get install --reinstall unrar
Try

Code: Select all

dpkg -l unrar*
Or maybe the guys at the mirror made a mistake and ship unrar-free under the name of unrar? Can it be? I wouldn't delete anything manually until I make sure that my database doesn't contain any unrars.
Last edited by Issyer on 2008-03-02 22:44, edited 4 times in total.

User avatar
izar
Posts: 1714
Joined: 2007-01-01 18:34
Location: Euskal Herria

#19 Post by izar »

If you have already purged unrar-free make sure that the file unrar-free is not in /usr/bin. That is the executable file and the rest of the package has only documentation, so you can remove the file without problems.

windrunner
Posts: 12
Joined: 2008-03-01 16:12

#20 Post by windrunner »

OK, I have found some closure to this. :o

I first ran whereis unrar and got:
unrar: /usr/bin/unrar /usr/X11R6/bin/unrar /usr/bin/X11/unrar /usr/local/bin/unrar /usr/share/man/man1/unrar.1.gz
I then ran all but the last location from the list. The first three locations were unrar (the non-free one) because they displayed this:
UNRAR 3.51 freeware Copyright (c) 1993-2005 Alexander Roshal

Usage: unrar <command> -<switch 1> -<switch N> <archive> <files...>
<@listfiles...> <path_to_extract\>
...
Only /usr/local/bin/unrar was the unrar-free version because it displayed:
/usr/local/bin/unrar: Archive not specified

Try `unrar --help' or `unrar --usage' for more information.
And after typing /usr/local/bin/unrar -V I got:
unrar 0.0.1
I ran /usr/bin/unrar on my .rar file and all went well! :D The file uncompressed successfully!

So I guess every time I just typed unrar it was running the version stored in /usr/local/bin/. What I wanna know is how come unrar-free is posing as unrar in /usr/local/bin/? :shock: ...and also if I should replace it with unrar from /usr/bin/ for instance to permanently get rid of unrar-free?

Post Reply