Problem with extracting rar files

Problem with extracting rar files

Posted by: Auriga
Posted on: 2007-08-08 14:56:00

I'm trying to extract a rar archive on my server. This rar archive is of the following structure:

+ somefolder *
a_file *
another_file *
...
readme.txt

The * means that these files/folders are password protected.

It appears that the rar command line tool is not able to handle such archives. If i try the following:

rar e myarchive.rar

It gives back an error:
RAR 3.30 Copyright (c) 1993-2004 Eugene Roshal 22 Jan 2004
Shareware version Type RAR -? for help

games.rar is not RAR archive
No files to extract

However, I am able to extract this archive on my Windows Home PC.

On other forums people suggested to use the unrar tool. I need to execute the following command to install that:

apt-get install unrar

Now, i get the following error:
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Probably, i don't have sufficient rights to execute this command. Who can tell me who I need to write to to get this tool installed on the server? Or alternatively: how can I solve this problem?

Thanks!

Re: Problem with extracting rar files

Posted by: Auriga
Posted on: 2007-08-08 15:32:00

I now tried the same thing on another server. There also the unrar tool wasn't able to extract the archive. So now it appears to really be a problem with the fact that the rar archive is password protected...

Isn't there any way that I can extract the contents of a password protected rar archive using the command line?

Re: Problem with extracting rar files

Posted by: anonymous2
Posted on: 2007-08-08 15:43:00

Do you know the password? If so you could try -hppassword or -ppassword options with rar. Doesn't it prompt for a password?

You can't install with apt-get, but DreamHost support might install an application if you ask.

Edit: There is also a chance the file was corrupted in upload; did you use binary?

ANONYMOUS0=>Max Discount ANONYMOUS2=>Max - $1. Being mean doesn't make you look smarter than him. And bigoted remarks are not appreciated on this forum.Edited by Anonymous2 on 08/08/07 03:44 PM (server time).

Re: Problem with extracting rar files

Posted by: Auriga
Posted on: 2007-08-09 00:02:00

I've tried to use unzip myarchive.rar and it worked! :)

It appears that the package extension was not valid?!

Well thanks for your answers!

Re: Problem with extracting rar files

Posted by: rlparker
Posted on: 2007-08-09 00:22:00

In reply to:

I've tried to use unzip myarchive.rar and it worked! :) It appears that the package extension was not valid?!


That explains a lot! I'm glad you got it worked out, and thanks for sharing with us what the problem was (I had no idea what could be happening) wink

--rlparker

Tags: libproblem thankspermission deniedpassword protectedfoldersreadmegames