hakimtai
Posts: 3
Joined: Mon Feb 11, 2019 1:59 pm

install unrar nonfree on raspbian (Stretch)

Mon Feb 11, 2019 2:21 pm

Hello everyone,

This will be my first post. I am trying to install unrar nonfree on raspbian (Stretch). i was using this guide https://gist.github.com/VadimBrodsky/1f ... d57095a806 but it seems i am not able to get past 2nd line where it says to Make sure you have a source repository by editing /etc/apt/sources.list cat /etc/apt/sources.list

I can open it as sudo nano /etc/apt/sources.list this opens up

deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-fre$

i do not understand what to do next. if i add the line cat /etc/apt/sources.list at bottom this then when i # Sync the apt database. with the command sudo apt-get update result in a error as below.

E: Type 'cat' is not known on line 4 in source list /etc/apt/sources.list
E: The list of sources could not be read.

Please help i am complete noob to all of this. if i am miss something please height.

Any help will be greatly appropriated

thanks.

chwe
Posts: 126
Joined: Tue Jul 31, 2018 1:35 pm

Re: install unrar nonfree on raspbian (Stretch)

Mon Feb 11, 2019 3:44 pm

hakimtai wrote:
Mon Feb 11, 2019 2:21 pm

deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-fre$

i do not understand what to do next. if i add the line cat /etc/apt/sources.list at bottom this then when i # Sync the apt database. with the command sudo apt-get update result in a error as below.

E: Type 'cat' is not known on line 4 in source list /etc/apt/sources.list
E: The list of sources could not be read.

Please help i am complete noob to all of this. if i am miss something please height.

Any help will be greatly appropriated

thanks.
http://man7.org/linux/man-pages/man1/cat.1.html
cat is often used to manipulate files without an editor (e.g. in bash-scripts).. If you open it in nano, there's no need for cat.. Your gist isn't a tutorial, it's a commented script which can be called with "bash install-unrar-nonfree-raspbian.sh" (could also be sh, but normally this doesn't matter, properly it would have a #!/bin/bash in the first line).

User avatar
rpdom
Posts: 15180
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: install unrar nonfree on raspbian (Stretch)

Mon Feb 11, 2019 3:52 pm

The command line starting with "cat" is just a way of listing the contents of the current file to see if you already have the bits you need in it. It is not a way of editing it.

The instructions are not very clear.

User avatar
DougieLawson
Posts: 36104
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: install unrar nonfree on raspbian (Stretch)

Mon Feb 11, 2019 6:36 pm

You don't need unrar. Install p7zip-full and it can handle rar files. That'll be a lot easier since it's availble in plain old Raspbian.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

chwe
Posts: 126
Joined: Tue Jul 31, 2018 1:35 pm

Re: install unrar nonfree on raspbian (Stretch)

Mon Feb 11, 2019 11:00 pm

https://gist.github.com/chwe17/89db2526 ... 991761894f

now it's really a script and not only half of the stack answer he refereed to... It works assuming you're on raspian stretch.

hakimtai
Posts: 3
Joined: Mon Feb 11, 2019 1:59 pm

Re: install unrar nonfree on raspbian (Stretch)

Tue Feb 12, 2019 3:47 pm

Thank you @chwe, @rpdom, @DougieLawson for your help

I have some how install it or so i think may be after fitting ever conner. I will list down all of the step please correct me if am wrong.

I followed this link https://raspberrypi.stackexchange.com/q ... ar-nonfree

sudo nano /etc/apt/sources.list

I added below line it in then fellowed listed commands

deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-fre$
#!/bin/bash
# make it executable with: sudo chmod a+x unrar.sh
# execute with: sudo ./unrar.sh
#sed -i 's+#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main cont$
#cd $(mktemp -d) && apt-get update && apt-get build-dep unrar-nonfree && apt-ge$
# Source repository to add
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi


sudo apt-get update
cd $(mktemp -d)
sudo apt-get build-dep unrar-nonfree
sudo apt-get source -b unrar-nonfree
sudo dpkg -i unrar*.deb

below is the result of this.


pi@raspberrypi:~ $ cd $(mktemp -d)
pi@raspberrypi:/tmp/tmp.pZB6tsaED3 $ sudo apt-get build-dep unrar-nonfree
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
pi@raspberrypi:/tmp/tmp.pZB6tsaED3 $ sudo nano /etc/apt/sources.list
You have new mail in /var/mail/pi
pi@raspberrypi:/tmp/tmp.pZB6tsaED3 $ sudo apt-get update
Hit:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
Get:3 http://archive.raspbian.org/raspbian wheezy InRelease [14.9 kB]
Get:4 http://archive.raspbian.org/raspbian wheezy/non-free Sources [98.4 kB]
Get:5 http://archive.raspbian.org/raspbian wheezy/contrib Sources [53.2 kB]
Get:6 http://archive.raspbian.org/raspbian wheezy/main Sources [6,097 kB]
Get:7 http://archive.raspbian.org/raspbian wheezy/rpi Sources [588 B]
Fetched 6,264 kB in 32s (194 kB/s)
Reading package lists... Done
pi@raspberrypi:/tmp/tmp.pZB6tsaED3 $ sudo apt-get build-dep unrar-nonfree
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
autoconf automake autopoint autotools-dev debhelper dh-autoreconf
dh-strip-nondeterminism gettext intltool-debian libarchive-zip-perl
libfile-stripnondeterminism-perl libsigsegv2 libtimedate-perl libtool m4
po-debconf
0 upgraded, 16 newly installed, 0 to remove and 39 not upgraded.
Need to get 5,186 kB of archives.
After this operation, 15.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf libsigsegv2 armhf 2.10-5 [28.4 kB]
Get:2 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf m4 armhf 1.4.18-1 [185 kB]
Get:3 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf autoconf all 2.69-10 [338 kB]
Get:4 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf autotools-dev all 20161112.1 [73.4 kB]
Get:5 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf automake all 1:1.15-6 [733 kB]
Get:6 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf autopoint all 0.19.8.1-2 [433 kB]
Get:7 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf libtool all 2.4.6-2 [545 kB]
Get:8 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf dh-autoreconf all 14 [15.9 kB]
Get:9 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf libarchive-zip-perl all 1.59-1+deb9u1 [96.2 kB]
Get:10 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf libfile-stripnondeterminism-perl all 0.034-1 [16.4 kB]
Get:11 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf libtimedate-perl all 2.3000-2 [42.2 kB]
Get:12 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf dh-strip-nondeterminism all 0.034-1 [10.5 kB]
Get:13 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf gettext armhf 0.19.8.1-2 [1,434 kB]
Get:14 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf intltool-debian all 0.35.0+20060710.4 [26.3 kB]
Get:15 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf po-debconf all 1.0.20 [247 kB]
Get:16 http://raspbian.mirror.net.in/raspbian/raspbian stretch/main armhf debhelper all 10.2.5 [961 kB]
Fetched 5,186 kB in 18s (280 kB/s)
Selecting previously unselected package libsigsegv2:armhf.
(Reading database ... 88357 files and directories currently installed.)
Preparing to unpack .../00-libsigsegv2_2.10-5_armhf.deb ...
Unpacking libsigsegv2:armhf (2.10-5) ...
Selecting previously unselected package m4.
Preparing to unpack .../01-m4_1.4.18-1_armhf.deb ...
Unpacking m4 (1.4.18-1) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../02-autoconf_2.69-10_all.deb ...
Unpacking autoconf (2.69-10) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../03-autotools-dev_20161112.1_all.deb ...
Unpacking autotools-dev (20161112.1) ...
Selecting previously unselected package automake.
Preparing to unpack .../04-automake_1%3a1.15-6_all.deb ...
Unpacking automake (1:1.15-6) ...
Selecting previously unselected package autopoint.
Preparing to unpack .../05-autopoint_0.19.8.1-2_all.deb ...
Unpacking autopoint (0.19.8.1-2) ...
Selecting previously unselected package libtool.
Preparing to unpack .../06-libtool_2.4.6-2_all.deb ...
Unpacking libtool (2.4.6-2) ...
Selecting previously unselected package dh-autoreconf.
Preparing to unpack .../07-dh-autoreconf_14_all.deb ...
Unpacking dh-autoreconf (14) ...
Selecting previously unselected package libarchive-zip-perl.
Preparing to unpack .../08-libarchive-zip-perl_1.59-1+deb9u1_all.deb ...
Unpacking libarchive-zip-perl (1.59-1+deb9u1) ...
Selecting previously unselected package libfile-stripnondeterminism-perl.
Preparing to unpack .../09-libfile-stripnondeterminism-perl_0.034-1_all.deb ...
Unpacking libfile-stripnondeterminism-perl (0.034-1) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../10-libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package dh-strip-nondeterminism.
Preparing to unpack .../11-dh-strip-nondeterminism_0.034-1_all.deb ...
Unpacking dh-strip-nondeterminism (0.034-1) ...
Selecting previously unselected package gettext.
Preparing to unpack .../12-gettext_0.19.8.1-2_armhf.deb ...
Unpacking gettext (0.19.8.1-2) ...
Selecting previously unselected package intltool-debian.
Preparing to unpack .../13-intltool-debian_0.35.0+20060710.4_all.deb ...
Unpacking intltool-debian (0.35.0+20060710.4) ...
Selecting previously unselected package po-debconf.
Preparing to unpack .../14-po-debconf_1.0.20_all.deb ...
Unpacking po-debconf (1.0.20) ...
Selecting previously unselected package debhelper.
Preparing to unpack .../15-debhelper_10.2.5_all.deb ...
Unpacking debhelper (10.2.5) ...
Setting up libarchive-zip-perl (1.59-1+deb9u1) ...
Setting up gettext (0.19.8.1-2) ...
Setting up libtimedate-perl (2.3000-2) ...
Setting up libsigsegv2:armhf (2.10-5) ...
Processing triggers for install-info (6.3.0.dfsg.1-1+b1) ...
Setting up m4 (1.4.18-1) ...
Setting up intltool-debian (0.35.0+20060710.4) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up autotools-dev (20161112.1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up autopoint (0.19.8.1-2) ...
Setting up libfile-stripnondeterminism-perl (0.034-1) ...
Setting up libtool (2.4.6-2) ...
Setting up po-debconf (1.0.20) ...
Setting up autoconf (2.69-10) ...
Setting up automake (1:1.15-6) ...
update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode
Setting up debhelper (10.2.5) ...
Setting up dh-autoreconf (14) ...
Setting up dh-strip-nondeterminism (0.034-1) ...
You have new mail in /var/mail/pi
pi@raspberrypi:/tmp/tmp.pZB6tsaED3 $ sudo apt-get source -b unrar-nonfree
Reading package lists... Done
Need to get 167 kB of source archives.
Get:1 http://archive.raspbian.org/raspbian wheezy/non-free unrar-nonfree 1:4.1.4-1+deb7u2 (dsc) [1,394 B]
Get:2 http://archive.raspbian.org/raspbian wheezy/non-free unrar-nonfree 1:4.1.4-1+deb7u2 (tar) [157 kB]
Get:3 http://archive.raspbian.org/raspbian wheezy/non-free unrar-nonfree 1:4.1.4-1+deb7u2 (diff) [8,417 B]
Fetched 167 kB in 1s (108 kB/s)
dpkg-source: info: extracting unrar-nonfree in unrar-nonfree-4.1.4
dpkg-source: info: unpacking unrar-nonfree_4.1.4.orig.tar.gz
dpkg-source: info: unpacking unrar-nonfree_4.1.4-1+deb7u2.debian.tar.gz
dpkg-source: info: applying fix-dir-traversal
dpkg-source: info: applying CVE-2012-6706
dpkg-buildpackage: info: source package unrar-nonfree
dpkg-buildpackage: info: source version 1:4.1.4-1+deb7u2
dpkg-buildpackage: info: source distribution wheezy-security
dpkg-buildpackage: info: source changed by Damian Lukowski <damian.lukowski@credativ.de>
dpkg-buildpackage: info: host architecture armhf
dpkg-source --before-build unrar-nonfree-4.1.4
debian/rules clean
dh_testdir
dh_testroot
make -f makefile.unix clean
make[1]: Entering directory '/tmp/tmp.pZB6tsaED3/unrar-nonfree-4.1.4'
make[1]: Leaving directory '/tmp/tmp.pZB6tsaED3/unrar-nonfree-4.1.4'
rm -rf unrar
dh_clean
dh_clean: Compatibility levels before 9 are deprecated (level 7 in use)
debian/rules build
dh_testdir
make -f makefile.unix
make[1]: Entering directory '/tmp/tmp.pZB6tsaED3/unrar-nonfree-4.1.4'
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c rar.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c strlist.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c strfn.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c pathfn.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c savepos.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c smallfn.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c global.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c file.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c filefn.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c filcreat.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c archive.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c arcread.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c unicode.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c system.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c isnt.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c crypt.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c crc.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c rawread.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c encname.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c resource.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c match.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c timefn.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c rdwrfn.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c consio.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c options.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c ulinks.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c errhnd.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c rarvm.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c rijndael.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c getbits.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c sha1.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c extinfo.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c extract.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c volume.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c list.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c find.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c unpack.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c cmddata.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c filestr.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c recvol.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c rs.cpp
g++ -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -c scantree.cpp
g++ -o unrar rar.o strlist.o strfn.o pathfn.o savepos.o smallfn.o global.o file.o filefn.o filcreat.o archive.o arcread.o unicode.o system.o isnt.o crypt.o crc.o rawread.o encname.o resource.o match.o timefn.o rdwrfn.o consio.o options.o ulinks.o errhnd.o rarvm.o rijndael.o getbits.o sha1.o extinfo.o extract.o volume.o list.o find.o unpack.o cmddata.o filestr.o recvol.o rs.o scantree.o
strip unrar
make[1]: Leaving directory '/tmp/tmp.pZB6tsaED3/unrar-nonfree-4.1.4'
debian/rules binary
dh_testdir
make -f makefile.unix
make[1]: Entering directory '/tmp/tmp.pZB6tsaED3/unrar-nonfree-4.1.4'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/tmp/tmp.pZB6tsaED3/unrar-nonfree-4.1.4'
dh_testdir
dh_testroot
dh_prep
dh_installdirs
dh_installdirs: Compatibility levels before 9 are deprecated (level 7 in use)
install -o root -g root -s -m 0755 unrar debian/unrar/usr/bin/unrar-nonfree
dh_installdocs
dh_installman debian/unrar-nonfree.1
dh_installman: Compatibility levels before 9 are deprecated (level 7 in use)
dh_installchangelogs
dh_installchangelogs: Compatibility levels before 9 are deprecated (level 7 in use)
dh_strip
dh_strip: Compatibility levels before 9 are deprecated (level 7 in use)
dh_compress
dh_fixperms
dh_installdeb
dh_installdeb: Compatibility levels before 9 are deprecated (level 7 in use)
dh_shlibdeps
dpkg-shlibdeps: warning: debian/unrar/usr/bin/unrar-nonfree contains an unresolvable reference to symbol __aeabi_atexit@CXXABI_ARM_1.3.3: it's probably a plugin
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package 'unrar' in '../unrar_4.1.4-1+deb7u2_armhf.deb'.
dpkg-genbuildinfo --build=binary
dpkg-genchanges --build=binary >../unrar-nonfree_4.1.4-1+deb7u2_armhf.changes
dpkg-genchanges: info: binary-only upload (no source code included)
dpkg-source --after-build unrar-nonfree-4.1.4
dpkg-buildpackage: info: binary-only upload (no source included)
W: Download is performed unsandboxed as root as file 'unrar-nonfree_4.1.4-1+deb7u2.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
You have new mail in /var/mail/pi
pi@raspberrypi:/tmp/tmp.pZB6tsaED3 $ sudo dpkg -i unrar*.deb
Selecting previously unselected package unrar.
(Reading database ... 89594 files and directories currently installed.)
Preparing to unpack unrar_4.1.4-1+deb7u2_armhf.deb ...
Unpacking unrar (1:4.1.4-1+deb7u2) ...
Setting up unrar (1:4.1.4-1+deb7u2) ...
update-alternatives: using /usr/bin/unrar-nonfree to provide /usr/bin/unrar (unrar) in auto mode
Processing triggers for man-db (2.7.6.1-2) ...

chwe
Posts: 126
Joined: Tue Jul 31, 2018 1:35 pm

Re: install unrar nonfree on raspbian (Stretch)

Tue Feb 12, 2019 8:31 pm

hakimtai wrote:
Tue Feb 12, 2019 3:47 pm
Thank you @chwe, @rpdom, @DougieLawson for your help

I have some how install it or so i think may be after fitting ever conner. I will list down all of the step please correct me if am wrong.

I followed this link https://raspberrypi.stackexchange.com/q ... ar-nonfree

sudo nano /etc/apt/sources.list

I added below line it in then fellowed listed commands

deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-fre$
#!/bin/bash
# make it executable with: sudo chmod a+x unrar.sh
# execute with: sudo ./unrar.sh
#sed -i 's+#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main cont$
#cd $(mktemp -d) && apt-get update && apt-get build-dep unrar-nonfree && apt-ge$
# Source repository to add
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi


sudo apt-get update
cd $(mktemp -d)
sudo apt-get build-dep unrar-nonfree
sudo apt-get source -b unrar-nonfree
sudo dpkg -i unrar*.deb
well.. the little script I wrote does it automatically.. means

Code: Select all

wget https://gist.githubusercontent.com/chwe17/89db2526d568d1376aa780991761894f/raw/ceac400fe97915f4da6e45560b6f064ac6c9c701/unrar.sh
sudo chmod a+x unrar.sh
sudo ./unrar.sh
and you're done.. you don't have to manipulate everything on your own.. asuming you're on raspian stretch. The reason I thought the gist you showed first is a script cause it's named 'install-unrar-nonfree-raspbian.sh' nobody ever names a file *.sh if it's not a sh or bash-script. I just had a quick overview and missed that it isn't actually a script.. it's mostly copy paste from the stack answer but he didn't had everything properly copied.. with the cat command he only wants to make sure sources are un-commented, but not manipulated.. (people often use 'cat x | *second command* ' stuff in bash-scripts but tbh I didn't look close enough to it - that's what I do with sed -i in my script).. Now you added debian wheezy sources things might mess up..
How much efforts did you already put into your installation? In case not that much I would start with a new image just calling the script from my gist. Otherwise we might first clean up what went wrong cause you've now different sources (once from wheezy once from stretch).

hakimtai
Posts: 3
Joined: Mon Feb 11, 2019 1:59 pm

Re: install unrar nonfree on raspbian (Stretch)

Wed Feb 13, 2019 4:46 pm

@ chwe Thank you. for that script. I will try it with fresh installation. but this is command line based is not it.

Return to “General discussion”