Debian
安裝 rsync 在子程序中停止並出現錯誤
我嘗試在執行在 Debian Squeeze 上的虛擬伺服器上安裝 rsync。
呼叫apt-get install rsync後,安裝程序停止使用以下輸出:
$ apt-get install rsync Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: rsync 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 359 kB of archives. After this operation, 721 kB of additional disk space will be used. Get:1 http://debian.netcup.net/debian/ squeeze/main rsync amd64 3.0.7-2 [359 kB] Fetched 359 kB in 0s (7480 kB/s) Selecting previously deselected package rsync. (Reading database ... 18123 files and directories currently installed.) Unpacking rsync (from .../rsync_3.0.7-2_amd64.deb) ... Processing triggers for man-db ... Setting up rsync (3.0.7-2) ... update-rc.d: using dependency based boot sequencing insserv: warning: script 'halt' missing LSB tags and overrides insserv: There is a loop between service umountfs and halt if stopped insserv: loop involving service halt at depth 5 insserv: loop involving service umountroot at depth 4 insserv: There is a loop between service umountfs and halt if stopped insserv: loop involving service umountfs at depth 4 insserv: loop involving service networking at depth 3 insserv: There is a loop between service halt and umountroot if stopped insserv: loop involving service umountnfs at depth 28 insserv: warning: script 'halt' missing LSB tags and overrides insserv: There is a loop between service umountfs and halt if stopped insserv: loop involving service halt at depth 5 insserv: loop involving service umountroot at depth 4 insserv: There is a loop between service umountfs and halt if stopped insserv: loop involving service umountfs at depth 4 insserv: loop involving service networking at depth 3 insserv: There is a loop between service halt and umountroot if stopped insserv: loop involving service umountnfs at depth 28 insserv: exiting now without changing boot order! update-rc.d: error: insserv rejected the script header dpkg: error processing rsync (--configure): subprocess installed post-installation script returned error exit status 1 configured to not write apport reports Errors were encountered while processing: rsync E: Sub-process /usr/bin/dpkg returned an error code (1)
在此安裝之前, apt-get install 每次都執行良好。我在嘗試安裝 git-core 之前進行了備份,因此在嘗試安裝 git 之前重置系統並檢查它是否執行良好對我來說沒有問題。
但我無法弄清楚問題所在!
發生錯誤是因為 /etc/default/halt 符號連結到 /bin/true。
這在早期版本中是可能的。但直到 Debian 6 InitScripts 在腳本文件的標頭檔中查找依賴項。因為 halt 符號連結到一個值 InitScripts 無法解析結果並導致錯誤。
將 /etc/default/halt 替換為其原始內容解決了該問題。