Upgrading to unrar 5+ in Debian Wheezy

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
ALbino
Full Member
Full Member
Posts: 214
Joined: October 23rd, 2014, 12:28 am

Upgrading to unrar 5+ in Debian Wheezy

Post by ALbino »

Hey all,

I recently encountered a RAR5 file in 1.0.1RC1 on my 64bit Debian Wheezy box and was unable to unrar it because the latest unrar for Wheezy is apparently 4.10:

I tried Googling this pretty heavily, but haven't really found many answers. Someone suggested you can install the Jessie unrar package to upgrade to 5+, but they also said that some password protected files might fail then, though I can't imagine why.

Any suggestions would be helpful, particularly suggestions with lots of hand-holding and specific lines to copy and paste as I'm a linux newbie :)
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Upgrading to unrar 5+ in Debian Wheezy

Post by sander »

That's not too difficult.

First some tests. What is your output from (post result here):

Code: Select all

which unrar
file unrar
unrar | head -2
Next steps:

Get it:

Code: Select all

cd
wget ftp://ftp.rarlabs.com/rar/rarlinux-x64-5.3.b6.tar.gz
tar xvzf rarlinux-x64-5.3.b6.tar.gz 
cd rar/
Check it (post the output here):

Code: Select all

file unrar
./unrar | head -2
If we agree all output looks good, a few more steps are needed.
ALbino
Full Member
Full Member
Posts: 214
Joined: October 23rd, 2014, 12:28 am

Re: Upgrading to unrar 5+ in Debian Wheezy

Post by ALbino »

Hey sander... I'm afraid I'm going to need even more hand holding :)

Here's the output from the first set:

Code: Select all

# which unrar
/usr/bin/unrar
# file unrar
unrar: ERROR: cannot open `unrar' (No such file or directory)
# unrar | head -2

UNRAR 4.10 freeware      Copyright (c) 1993-2012 Alexander Roshal
I tried to change directories into /usr/bin/unrar, but it says:

Code: Select all

 # cd usr/bin/unrar
-bash: cd: usr/bin/unrar: Not a directory
If I switch to /usr/bin and run file unrar again it says:

Code: Select all

/usr/bin # file unrar
unrar: symbolic link to `/etc/alternatives/unrar'
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Upgrading to unrar 5+ in Debian Wheezy

Post by sander »

Ah, I see ... ;-)

Let's proceed anyway:

Code: Select all

cd
wget ftp://ftp.rarlabs.com/rar/rarlinux-x64-5.3.b6.tar.gz
tar xvzf rarlinux-x64-5.3.b6.tar.gz 
cd rar/

file unrar
./unrar | head -2
Post the output of the last two commands.
ALbino
Full Member
Full Member
Posts: 214
Joined: October 23rd, 2014, 12:28 am

Re: Upgrading to unrar 5+ in Debian Wheezy

Post by ALbino »

At first it appears like it worked:

Code: Select all

/ # cd
~ # wget ftp://ftp.rarlabs.com/rar/rarlinux-x64-5.3.b6.tar.gz
--2016-04-30 21:05:34--  ftp://ftp.rarlabs.com/rar/rarlinux-x64-5.3.b6.tar.gz
           => `rarlinux-x64-5.3.b6.tar.gz'
Resolving ftp.rarlabs.com (ftp.rarlabs.com)... 5.135.104.98
Connecting to ftp.rarlabs.com (ftp.rarlabs.com)|5.135.104.98|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /rar ... done.
==> SIZE rarlinux-x64-5.3.b6.tar.gz ... 1149509
==> PASV ... done.    ==> RETR rarlinux-x64-5.3.b6.tar.gz ... done.
Length: 1149509 (1.1M) (unauthoritative)

100%[======================================================================================================================================================================================================================>] 1,149,509   --.-K/s   in 0.08s   

2016-04-30 21:05:34 (13.7 MB/s) - `rarlinux-x64-5.3.b6.tar.gz' saved [1149509]

~ # tar xvzf rarlinux-x64-5.3.b6.tar.gz 
rar/
rar/order.htm
rar/acknow.txt
rar/readme.txt
rar/rar_static
rar/default.sfx
rar/license.txt
rar/rarfiles.lst
rar/whatsnew.txt
rar/makefile
rar/rar
rar/unrar
rar/rar.txt
~ # cd rar/
~/rar # file unrar
unrar: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=0xf34c0d5643169b423c466ee566e881288198d6f9, stripped
~/rar # ./unrar | head -2

UNRAR 5.30 beta 6 freeware      Copyright (c) 1993-2015 Alexander Roshal
~/rar # 
But then when I type unrar it still says:

Code: Select all

~ # unrar

UNRAR 4.10 freeware      Copyright (c) 1993-2012 Alexander Roshal
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Upgrading to unrar 5+ in Debian Wheezy

Post by sander »

OK, good so far.

Now the final step:

Still in that directory (so: ~/rar), do exactly this:

Code: Select all

sudo cp unrar /usr/bin/unrar
Then (in any directory):

Code: Select all

unrar | head -2
Post all output here.
ALbino
Full Member
Full Member
Posts: 214
Joined: October 23rd, 2014, 12:28 am

Re: Upgrading to unrar 5+ in Debian Wheezy

Post by ALbino »

Ah ha! I think that worked :)

Code: Select all

~/rar # sudo cp unrar /usr/bin/unrar
~/rar # unrar | head -2

UNRAR 5.30 beta 6 freeware      Copyright (c) 1993-2015 Alexander Roshal
~/rar # unrar

UNRAR 5.30 beta 6 freeware      Copyright (c) 1993-2015 Alexander Roshal
Does that look good?
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Upgrading to unrar 5+ in Debian Wheezy

Post by sander »

ALbino wrote:
Does that look good?
You tell me ... ;)

Or let sabnzbd.log (with +Debug) tell you ... look for a line like this:

Code: Select all

2016-04-30 21:26:49,601::DEBUG::[newsunpack:149] UNRAR binary version 5.00
ALbino
Full Member
Full Member
Posts: 214
Joined: October 23rd, 2014, 12:28 am

Re: Upgrading to unrar 5+ in Debian Wheezy

Post by ALbino »

Yep, all good! I was getting an Unusable RAR File error before on some RAR5 files, and I just hit the Retry button and it extracted successfully :)

Code: Select all

2016-04-30 21:35:49,606::DEBUG::[newsunpack:764] UNRAR output 
UNRAR 5.30 beta 6 freeware      Copyright (c) 1993-2015 Alexander Roshal
Thanks for the help sander, I really appreciate it!
Post Reply