Page 1 of 1

No PAR2 program found, repairs not possible [Stora Netgear]

Posted: December 26th, 2013, 7:02 am
by j2m2
Hi guys,

I have SABnzbd installed on my Stora Netgear but I have 3 warnings:
2013-12-26 12:31:24,314 WARNING: unzip binary... NOT found!
2013-12-26 12:31:24,311 WARNING: unrar binary... NOT found
2013-12-26 12:31:24,296 ERROR: par2 binary... NOT found!

if I start it using the root user I don't receive the warnings.
/home/opt/bin/python2.5 /home/user/sabnzbd/SABnzbd.py -d -f /home/user/.sabnzbd/sabnzbd.ini

if I start it in the file rc.local then I receive the warnings.

If I type the commands on any user I have access to them so it's not a path thing.

Cheers,
j2m2

Re: No PAR2 program found, repairs not possible [Stora Netge

Posted: December 26th, 2013, 7:44 am
by sander
Maybe the PATH is different when you start from rc.local? You could verify that using this method:

Code: Select all

which par2
Find and edit the file SABnzbd.py (or sabnzbd.py or sabnzbdplus.py ...), and find this part:

Code: Select all

def print_modules():
    """ Log all detected optional or external modules
    """
and add just one line:

Code: Select all

def print_modules():
    """ Log all detected optional or external modules
    """

    logging.error("PATH is (%s)", os.getenv('PATH') )
Note: Python is indention sensitive.
Then save and exit.


Then run SABnzbd from the command line to see it says something like:

Code: Select all

2013-12-26 13:39:10,476::INFO::[SABnzbd:334] Web dir is /home/sander/Downloads/SABnzbd-0.7.16/interfaces/Config
2013-12-26 13:39:10,482::ERROR::[SABnzbd:463] PATH is (/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games)
2013-12-26 13:39:10,482::INFO::[SABnzbd:466] _yenc module... found!
If you find that line, stop SABnzbd and run it as a service and check the line again ...

Re: No PAR2 program found, repairs not possible [Stora Netge

Posted: December 26th, 2013, 9:05 am
by j2m2
Thanks for your help.

Which result:
$which unzip unrar par2
/opt/bin/unzip
/opt/bin/unrar
/opt/bin/par2
Running SABnzbd after a reboot (rc.local):
WARNING: unzip binary... NOT found!
WARNING: unrar binary... NOT found
ERROR: par2 binary... NOT found!
ERROR: PATH is (/sbin:/usr/sbin:/bin:/usr/bin)

Running SABnzbd from the command line :
ERROR: PATH is (/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/sbin:/opt/sbin:/usr/sbin:/sbin:/opt/bin:/opt/sbin)
It´s clear that is a path problem.
How can I add the /opt/bin to the path or should I create a link in the "/bin" to the files?

Re: No PAR2 program found, repairs not possible [Stora Netge

Posted: December 26th, 2013, 4:00 pm
by sander
Good: the cause is now clear.

Maybe the most easy hack/workaround is to create (symbolic) links for par2, unrar and unzip in /usr/bin/ to /opt/bin/

Re: No PAR2 program found, repairs not possible [Stora Netge

Posted: December 26th, 2013, 4:24 pm
by j2m2
Thank you for your help.
It works now. :)