Rileytron
Posts: 3
Joined: Fri May 12, 2017 3:09 pm

NTP Fails to start or install

Fri May 12, 2017 3:18 pm

I'm running home automation software on my Pi (Home Assistant) and recently noticed the time was off by exactly one hour and 4 minutes. I thought it was a time zone issue, but after checking all settings and help from another user, I found that ntp has a broken install and I cannot get it to install or reinstall. I'm not new to the raspberry pi, but I'm new when I comes to issues of dependancies and problems like this. I started with a clean install of Raspbian Jessie if that helps. Any help would be appreciated!!

Here's the log when I try to install ntp:

pi@raspberrypi:~ $ sudo aptitude install ntp
The following partially installed packages will be configured:
bsd-mailx exim4-daemon-light ntp
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 197 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up ntp (1:4.2.6.p5+dfsg-7+deb8u2) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Job for ntp.service failed. See 'systemctl status ntp.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript ntp, action "start" failed.
dpkg: error processing package ntp (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up exim4-daemon-light (4.84.2-2+deb8u3) ...
Job for exim4.service failed. See 'systemctl status exim4.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript exim4, action "start" failed.
dpkg: error processing package exim4-daemon-light (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of bsd-mailx:
bsd-mailx depends on default-mta | mail-transport-agent; however:
Package default-mta is not installed.
Package exim4-daemon-light which provides default-mta is not configured yet.
Package mail-transport-agent is not installed.
Package exim4-daemon-light which provides mail-transport-agent is not configured yet.

dpkg: error processing package bsd-mailx (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
ntp
exim4-daemon-light
bsd-mailx
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up ntp (1:4.2.6.p5+dfsg-7+deb8u2) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Job for ntp.service failed. See 'systemctl status ntp.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript ntp, action "start" failed.
dpkg: error processing package ntp (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up exim4-daemon-light (4.84.2-2+deb8u3) ...
Job for exim4.service failed. See 'systemctl status exim4.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript exim4, action "start" failed.
dpkg: error processing package exim4-daemon-light (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of bsd-mailx:
bsd-mailx depends on default-mta | mail-transport-agent; however:
Package default-mta is not installed.
Package exim4-daemon-light which provides default-mta is not configured yet.
Package mail-transport-agent is not installed.
Package exim4-daemon-light which provides mail-transport-agent is not configured yet.

dpkg: error processing package bsd-mailx (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
ntp
exim4-daemon-light
bsd-mailx

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: NTP Fails to start or install

Fri May 12, 2017 5:15 pm

Which model RPi? Which OS? Which network device?

Rileytron
Posts: 3
Joined: Fri May 12, 2017 3:09 pm

Re: NTP Fails to start or install

Sat May 13, 2017 6:02 pm

Pi 3 b
Jessie
Wired Network

User avatar
scruss
Posts: 3256
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: NTP Fails to start or install

Sat May 13, 2017 6:54 pm

Rileytron wrote: ...
pi@raspberrypi:~ $ sudo aptitude install ntp
The following partially installed packages will be configured:
bsd-mailx exim4-daemon-light ntp
The "partially installed" bit gives me pause. Was the installation media corrupt? From memory, ntp is installed by default even on Raspbian Lite.

Try

Code: Select all

sudo apt install -f
to complete installation. You may need to do a fresh installation if base distro packages are broken.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

Rileytron
Posts: 3
Joined: Fri May 12, 2017 3:09 pm

Re: NTP Fails to start or install

Sun May 14, 2017 12:13 am

Yeah it seems it's broken. No matter what I do, I fails out at NTP. Is a clean install the only fix for this?

this is after running sudo apt install -f

Setting up ntp (1:4.2.6.p5+dfsg-7+deb8u2) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Job for ntp.service failed. See 'systemctl status ntp.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript ntp, action "start" failed.
dpkg: error processing package ntp (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up samba (2:4.2.14+dfsg-0+deb8u5) ...
Job for smbd.service failed. See 'systemctl status smbd.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript smbd, action "start" failed.
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up rpcbind (0.2.1-6+deb8u2) ...
insserv: warning: current start runlevel(s) (empty) of script `rpcbind' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (0 1 6 S) of script `rpcbind' overrides LSB defaults (0 1 6).
Job for rpcbind.service failed. See 'systemctl status rpcbind.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript rpcbind, action "start" failed.
dpkg: error processing package rpcbind (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
ntp
samba
rpcbind
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@raspberrypi:~ $

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: NTP Fails to start or install

Sun May 14, 2017 12:14 pm

Have you tried purging ntp? Worked for me when I had trouble with ntp.

Code: Select all

$ sudo apt-get purge ntp
Reboot, then

Code: Select all

$ sudo apt-get install ntp

Return to “Troubleshooting”