I'm trying to install NZBGet on Ubuntu 14.04 LTS It's a fresh install of Ubuntu, and it's inside VirtualBox.
I've been following this guide:
http://www.htpcguides.com/install-latest...y-updates/
And have had lots of issues. I believe I've gotten it to work, but it required alot of changes from the guides. I'm posting this if you want to change things around for others, as I fought with this for a while before I got it working (I think).
First step in the guide:
Gives me an error:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
I found through googling if I add sudo to it, it will work. And it does. Don't know if you want to add a footnote to that one.
Further down the guide at this step:
Gives me these errors:
chown: changing ownership of ‘/opt/nzbget/ChangeLog’: Operation not permitted
chown: changing ownership of ‘/opt/nzbget/nzbget.conf’: Operation not permitted
<snip>
Putting sudo in front fixed it again.
So other than those issues, and how I got around it, everything is fine to this point. Now I am to this step in the guide:
Create the NZBGet systemd service, if you are on Ubuntu 14.x use the init.d script from here
So I jump over to that guide. And I go to and start at this step:
NZBGet Init.d Script
I should note, this is where things really start to veer off the beaten path.
First step:
Edit your NZBGet configuration
Opens a blank GNU nano window. The file is empty. So I scrolled back up and found these steps that refer to that:
Copy the NZBGet default configuration
Doing that gives me an error:
cp: cannot stat ‘/usr/share/nzbget/nzbget.conf’: No such file or directory
So I revised the path and did:
And that worked. So then I did:
Take ownership of the NZBGet configuration file with your user
And it worked too. Then I went back to these steps:
Edit your NZBGet configuration
Use Ctrl+W to find DaemonUsername=root and change it to your user
GNU nano opened, and my username was already there. So I kept on trucking.
Create the init.d script
Paste this NZBGet init.d script, change user to your username, adjust /usr/bin/nzbget to /opt/nzbget/nzbget if you are using the newer guide on Ubuntu 14.x
As I am on Ubunti 14, I made the changes. Here's the script I used for reference:
I did the steps down to here:
You say:
Reboot to test, if it will only work once the system has been up you can use a cronjob in conjunction with the init.d script.
So I reboot, and it does work afterwards.
However, in my trials of getting all of this to work, I had moved on to the next step at one point:
This command adds a cronjob to start nzbget every time it boots if the init.d script isn’t doing the job
and when I ran that step just like it is, all I get was this:
>
I had to CTRL+C to get back to command prompt. I did a bit of googling and found there needs to be a quotation between the D and the semicolon, and used this:
When I did that I got a blank line afterwards. I again had to CTRL+C again to get back to a bash prompt. I then did:
And the "reboot nzbget" was listed. I can't tell you if that would fix it if the init.d script wasn't working as after I had rebooted it still wasn't working but that was before I realized I was missing the nzbget.conf file. So the only reason I post this last section is just to advise on the missing quotation mark.
So that's it (I think). I hope this helps you build a better guide, and helps someone else who may be struggling. Your site is great, please keep on posting!
I've been following this guide:
http://www.htpcguides.com/install-latest...y-updates/
And have had lots of issues. I believe I've gotten it to work, but it required alot of changes from the guides. I'm posting this if you want to change things around for others, as I fought with this for a while before I got it working (I think).
First step in the guide:
Code:
apt-get install build-essential -y
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
I found through googling if I add sudo to it, it will work. And it does. Don't know if you want to add a footnote to that one.
Further down the guide at this step:
Code:
chown -R username:username /opt/nzbget
chown: changing ownership of ‘/opt/nzbget/ChangeLog’: Operation not permitted
chown: changing ownership of ‘/opt/nzbget/nzbget.conf’: Operation not permitted
<snip>
Putting sudo in front fixed it again.
So other than those issues, and how I got around it, everything is fine to this point. Now I am to this step in the guide:
Create the NZBGet systemd service, if you are on Ubuntu 14.x use the init.d script from here
So I jump over to that guide. And I go to and start at this step:
NZBGet Init.d Script
I should note, this is where things really start to veer off the beaten path.
First step:
Edit your NZBGet configuration
Code:
sudo nano ~/.nzbget
Opens a blank GNU nano window. The file is empty. So I scrolled back up and found these steps that refer to that:
Copy the NZBGet default configuration
Code:
sudo cp /usr/share/nzbget/nzbget.conf ~/.nzbget
cp: cannot stat ‘/usr/share/nzbget/nzbget.conf’: No such file or directory
So I revised the path and did:
Code:
sudo cp /opt/nzbget/nzbget.conf ~/.nzbget
And that worked. So then I did:
Take ownership of the NZBGet configuration file with your user
Code:
sudo chown user:user ~/.nzbget
And it worked too. Then I went back to these steps:
Edit your NZBGet configuration
Code:
sudo nano ~/.nzbge
Code:
DaemonUsername=user
GNU nano opened, and my username was already there. So I kept on trucking.
Create the init.d script
Code:
sudo nano /etc/init.d/nzbget
Paste this NZBGet init.d script, change user to your username, adjust /usr/bin/nzbget to /opt/nzbget/nzbget if you are using the newer guide on Ubuntu 14.x
As I am on Ubunti 14, I made the changes. Here's the script I used for reference:
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides: nzbget
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Should-Start: $NetworkManager
# Should-Stop: $NetworkManager
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts instance of NZBGet
# Description: starts instance of NZBGet using start-stop-daemon
### END INIT INFO
# Source init functions
. /lib/lsb/init-functions
# Start/stop the NZBget daemon.
#
case "$1" in
start) echo -n "Start services: NZBget"
/opt/nzbget/nzbget -D -c /home/user/.nzbget
;;
stop) echo -n "Stop services: NZBget"
/opt/nzbget/nzbget -Q
;;
restart)
$0 stop
$0 start
;;
*) echo "Usage: $0 start|stop|restart"
exit 1
;;
esac
exit 0
I did the steps down to here:
Code:
sudo update-rc.d nzbget defaults
You say:
Reboot to test, if it will only work once the system has been up you can use a cronjob in conjunction with the init.d script.
So I reboot, and it does work afterwards.
However, in my trials of getting all of this to work, I had moved on to the next step at one point:
This command adds a cronjob to start nzbget every time it boots if the init.d script isn’t doing the job
Code:
crontab -l | { cat; echo "@reboot nzbget -D ; } | crontab -
>
I had to CTRL+C to get back to command prompt. I did a bit of googling and found there needs to be a quotation between the D and the semicolon, and used this:
Code:
crontab -l | { cat; echo "@reboot nzbget -D"; } | crontab -
When I did that I got a blank line afterwards. I again had to CTRL+C again to get back to a bash prompt. I then did:
Code:
crontab -l
So that's it (I think). I hope this helps you build a better guide, and helps someone else who may be struggling. Your site is great, please keep on posting!