Turns out it is not as simple, and grasshopper (me) ended up spending a few weekends trying to figure this out. As a result, this will qualify for a post in my "notsofast"rants.
unrar is not free?
As it turns out, at some point in the Ubuntu branches, someone with wisdom decides that unrar is no longer obtainable as a "free" software. But there is help! By looking around, you will find one called unrar-free: http://manpages.ubuntu.com/manpages/hardy/man1/unrar-free.1.html
And you can certainly do "sudo apt-get install unrar-free" and it will tell you that it installs successfully. If you type a command "which unrar", it will even tell you that it is installed into /usr/bin/unrar.
unrar-free failed to work
Just when I thought the program will simply work as other wonderful utilities within Ubuntu, I started noticing that the unrar is not extracting the files properly.
unrar 0.0.1 Copyright (C) 2004 Ben Asselstine, Jeroen Dekkers
Extracting from mydir/myrarfile.rar
Extracting myrarfile.rar Failed
1 Failed
As I started to google around, it is evident that I am not the only one facing this issue but, I just could not find one journal that thas a solution workable for me. Well, a few weekends checking around, today I stumbled on a couple of journals that I thought could help me.
The Solution
By reading problems that others are facing, I started suspecting that I do not have all the dependency packages but, I am not experienced enough to debug this. I started to notice that, if I do a command "which rar", Ubuntu is telling me that I don't have the "rar" package. So I started suspecting that being the cause and hunting around how to install rar.Somehow my journey leads me to look into adding more repositories. Since I am using command line, I need to go into my /etc/apt and edit the sources.list file.
The first line I tried to add was "deb http://old-releases.ubuntu.com/ubuntu quantal multiverse" that came from some older sources.list files of mine but this did not help.
In the end, I found this journal that talked more about some of the keywords for the sources.list file that I found useful:
https://help.ubuntu.com/community/Repositories/Ubuntu
https://help.ubuntu.com/community/Repositories/CommandLine
I decided to add the keyword "Multiverse" into my repositories as follows:
Afterward, I just re-ran the normal "sudo apt-get update" again. This time it added a lot more files into my system and did show a warning as follows:
After this is done, I decided to install "rar" - the package which I suspected was missing
Now, if I run that unrar e myrarfile.rar again, it works flawlessly.
I hope this helps someone else who got stuck like me. Enjoy!
Yours Truly
HT
No comments:
Post a Comment