2016-03-09 69 views
0

我想執行apt-get的升級命令,但它堅持了以下錯誤:易於得到升級失敗,主機名錯誤

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) 

請幫我解決一下。這是服務器和我的所有操作卡住,因爲沒有任何工作。

回答

0

這真的很可怕。這個錯誤實際上是由於強制升級一些導致升級整個操作系統的軟件包。

所以,如果你得到這樣的錯誤,風險是100%繼續與該服務器。你只有最後的希望,通過deb或tar文件安裝所有必需的軟件包,因爲你不能再使用apt-get了。

所以只是魅力和格式服務器或繼續風險;)(修復您的問題後不要重新啓動。)