I am trying to perform apt-get upgrade command but it's stuck with following Error:
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^(.*?)(\\)?\${ <-- HERE ([^{}]+)}(.*)$/ at /usr/share/perl5/Debconf/Question.pm line 72.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^}]+)}/ at /usr/share/perl5/Debconf/Config.pm line 30.
Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up hostname (3.16ubuntu2) ...
insserv: warning: script 'friendly-recovery' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `friendly-recovery'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `friendly-recovery'
insserv: warning: script 'cron' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `cron'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `cron'
insserv: warning: script 'sshd' missing LSB tags and overrides
insserv: script sshd: service sshd already provided!
insserv: There is a loop between service monit and sshd if stopped
insserv: loop involving service sshd at depth 2
insserv: loop involving service monit at depth 1
insserv: Stopping ssh depends on monit and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package hostname (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
hostname
E: Sub-process /usr/bin/dpkg returned an error code (1)
Please help me to solve it out. It's server and my all operations stuck as nothing is working.
It's really very horrible. This error is actual due to forcefully upgrading some packages which resulted to upgrade the whole OS.
So if you get such error, risk is 100% to continue with that server. You just have a last hope to install all required packages via deb or tar file as you can't use apt-get anymore.
So just be charm and format server or continue with risk ;) (Don't restart after fix your issue.)