Created
October 8, 2016 18:30
-
-
Save VadimBrodsky/1f567067e2cd438312bb9fd57095a806 to your computer and use it in GitHub Desktop.
Get Unrar Nonfree on Raspbian for the Raspberry PI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# As per this guide -- http://raspberrypi.stackexchange.com/questions/3617/how-to-install-unrar-nonfree#3618 | |
# Uninstall unrar-free. | |
sudo apt-get remove unrar-free | |
# Make sure you have a source repository by editing /etc/apt/sources.list. | |
cat /etc/apt/sources.list | |
# Sync the apt database. | |
sudo apt-get update | |
# Create a working directory and move into it. The unrar-nonfree command will be built in this directory. | |
mkdir ~/unrar-nonfree && cd ~/unrar-nonfree | |
# Install the dependencies required by unrar-nonfree. | |
sudo apt-get build-dep unrar-nonfree | |
# Download the unrar-nonfree sources and build the .deb package. | |
sudo apt-get source -b unrar-nonfree | |
# Install the generated .deb package. Its name varies depending on the version of unrar-nonfree. | |
sudo dpkg -i unrar*.deb | |
# You can remove the working directory you created in 4.. | |
cd && rm -r ~/unrar-nonfree | |
# Once installed, you can use either unrar or unrar-nonfree (unrar is a simlink to unrar-nonfree). | |
# with unrar-free | |
# unrar -x my_archive.part01.rar | |
# with unrar-nonfree | |
# unrar e my_archive.part01.rar | |
# Please man unrar-nonfree for more details. |
For this to work, I had to uncomment this line in my /etc/apt/sources.list
:
deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
### Tested on pi4 arm64
sudo apt-get remove unrar-free;cd /tmp/;sudo echo 'deb-src http://deb.debian.org/debian buster main contrib non-free'>> /etc/apt/sources.list;sudo apt-get update;sudo apt-get build-dep unrar-nonfree;sudo apt-get source -b unrar-nonfree;sudo dpkg -i unrar*.deb; echo 'done'
I like to add an alias to do it recursively
alias unrardir='/usr/bin/unrar-nonfree e -r *.rar'
I also chmod 777 the bin so torrent applicatiosn can use it (This is technically insecure but it does the job)
sudo chmod 777 /usr/bin/unrar-nonfree
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think line 26 should be changed to
cd && sudo rm -r ~/unrar-nonfree