unrar for sabnzbd

trying to install unrar but having lots of problems.

Tried this after looking around.

G_AGP unrar-free

wget http://ftp.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_5.3.2-1+deb9u1_armhf.deb -O package.deb
dpkg -i package.deb
dietpi-services restart

but it didn’t work

root@DietPi:~# dpkg -i package.deb
(Reading database … 45925 files and directories currently installed.)
Preparing to unpack package.deb …
Unpacking unrar (1:5.3.2-1+deb9u1) over (1:5.3.2-1+deb9u1) …
dpkg: dependency problems prevent configuration of unrar:
unrar depends on libstdc++6 (>= 5); however:
Version of libstdc++6:armhf on system is 4.9.2-10+deb8u1.

dpkg: error processing package unrar (–install):
dependency problems - leaving unconfigured
Errors were encountered while processing:

Any help would be great

Try this instead : (and please fellows, if anyone has a better way to do this, please share it)

#We edit the sources.list
cat /etc/apt/sources.list
# Default repository is:
deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
# Source repository you add on a new line:
deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi

#Then we run apt-get update: 

sudo apt-get update

# after that we make a temp file;

cd $(mktemp -d)

#followed by preparing by getting all dependencies;

sudo apt-get build-dep unrar-nonfree

#Then we download and build;

sudo apt-get source -b unrar-nonfree

# When that's done, we install:

sudo dpkg -i unrar*.deb

That’s how i got non-free installed in my current build.
Why non-free ?
The free version cannot unpack multipart rar files.
And Usenet being all par2 and multipart rar files…

Well that worked. Thanks alot.

Now just gotta get my readynas shares avalaible to the dietpi and I will be set.