My raspberry was wrong time and date. I run 'ps auxwww | grep ntp' and i get:
pi 7282 0.0 0.1 4248 1480 pts/0 S+ 05:50 0:00 grep --color=auto ntp
So i don't have ntp service running..
sudo systemctl status ntp.service
● ntp.service - LSB: Start NTP daemon
Loaded: loaded (/etc/init.d/ntp)
Active: failed (Result: exit-code) since Fri 2017-03-03 05:42:47 WET; 9min ago
Process: 5126 ExecStart=/etc/init.d/ntp start (code=exited, status=2)
Mar 03 05:42:47 raspberrypi ntp[5126]: /etc/init.d/ntp: 6: /lib/lsb/init-functions.d/20-left-info-blocks: Syntax er...pected
Mar 03 05:42:47 raspberrypi systemd[1]: ntp.service: control process exited, code=exited status=2
Mar 03 05:42:47 raspberrypi systemd[1]: Failed to start LSB: Start NTP daemon.
Mar 03 05:42:47 raspberrypi systemd[1]: Unit ntp.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full
If i trỹ install again ntp, gives so many errors:
sudo apt-get install ntp
Reading package lists... Done
Building dependency tree
Reading state information... Done
ntp is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = "pt_PT.UTF-8",
LC_MONETARY = "pt_PT.UTF-8",
LC_CTYPE = "pt_PT.UTF-8",
LC_ADDRESS = "pt_PT.UTF-8",
LC_TELEPHONE = "pt_PT.UTF-8",
LC_NAME = "pt_PT.UTF-8",
LC_MEASUREMENT = "pt_PT.UTF-8",
LC_IDENTIFICATION = "pt_PT.UTF-8",
LC_NUMERIC = "pt_PT.UTF-8",
LC_PAPER = "pt_PT.UTF-8",
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
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
Errors were encountered while processing:
ntp
E: Sub-process /usr/bin/dpkg returned an error code (1)
I read many similar problems but none helped me ..
I tried solve the locale problem, but gives me identical error:
sudo dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "pt_PT.UTF-8",
LC_ADDRESS = "pt_PT.UTF-8",
LC_MONETARY = "pt_PT.UTF-8",
LC_NUMERIC = "pt_PT.UTF-8",
LC_TELEPHONE = "pt_PT.UTF-8",
LC_IDENTIFICATION = "pt_PT.UTF-8",
LC_MEASUREMENT = "pt_PT.UTF-8",
LC_CTYPE = "pt_PT.UTF-8",
LC_TIME = "pt_PT.UTF-8",
LC_NAME = "pt_PT.UTF-8",
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
en_GB.UTF-8... done
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = "pt_PT.UTF-8",
LC_MONETARY = "pt_PT.UTF-8",
LC_CTYPE = "pt_PT.UTF-8",
LC_ADDRESS = "pt_PT.UTF-8",
LC_TELEPHONE = "pt_PT.UTF-8",
LC_NAME = "pt_PT.UTF-8",
LC_MEASUREMENT = "pt_PT.UTF-8",
LC_IDENTIFICATION = "pt_PT.UTF-8",
LC_NUMERIC = "pt_PT.UTF-8",
LC_PAPER = "pt_PT.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = "pt_PT.UTF-8",
LC_MONETARY = "pt_PT.UTF-8",
LC_CTYPE = "pt_PT.UTF-8",
LC_ADDRESS = "pt_PT.UTF-8",
LC_TELEPHONE = "pt_PT.UTF-8",
LC_NAME = "pt_PT.UTF-8",
LC_MEASUREMENT = "pt_PT.UTF-8",
LC_IDENTIFICATION = "pt_PT.UTF-8",
LC_NUMERIC = "pt_PT.UTF-8",
LC_PAPER = "pt_PT.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
How can i update Raspberry Time/Date automatically?
sudo /etc/init.d/ntp restart
and thendate
does it give you something? Also are youssh
'ing into your Pi?