Debian-Wheezy
將 qmail 從 1.03-38 升級到 1.06-5
我有點苦惱。我試圖升級一個 chroot 的環境,似乎我在這個過程中破壞了 dpkg。
我不知道問題的原因是 apt-get 無法處理 qmail 升級還是其他原因(似乎 snmpd 在上一輪也沒有“完成”)。
我認為我要解決的錯誤是:
E: Sub-process /usr/bin/dpkg returned an error code (1)
看來我有一個非常舊的 qmail 版本,升級到我的 apt 鏡像中的那個改變太大了。我用Google搜尋過,還沒有找到 1.03-38 和 1.06-5 之間的任何東西。
(刪除了幾行並在格式上苦苦掙扎)
# apt-get install qmail The following extra packages will be installed: qmail-run qmail-uids-gids Suggested packages: dot-forward qmail-tools The following NEW packages will be installed: qmail-run qmail-uids-gids The following packages will be upgraded: qmail 1 upgraded, 2 newly installed, 0 to remove and 1 not upgraded. 107 not fully installed or removed. Do you want to continue [Y/n]? Get:1 http://10.105.176.67/debian/ wheezy/main snmpd i386 5.4.3~dfsg-2.8+deb7u1 [964 kB] Fetched 964 kB in 0s (6,685 kB/s) Can not write log, openpty() failed (/dev/pts not mounted?) (Reading database ... 1852018 files and directories currently installed.) Preparing to replace qmail 1.03-38 (using .../archives/qmail_1.06-5_i386.deb) ... Upgrading from qmail version 1.03-38 is not yet supported. dpkg: error processing /var/cache/apt/archives/qmail_1.06-5_i386.deb (--unpack): subprocess new pre-installation script returned error exit status 1 rmdir: failed to remove `/var/lib/qmail': Directory not empty insserv: warning: script 'K01qmail' missing LSB tags and overrides insserv: warning: script 'qmail' missing LSB tags and overrides dpkg: regarding .../qmail-uids-gids_1.06-5_all.deb containing qmail-uids-gids: qmail conflicts with qmail-uids-gids qmail-uids-gids (version 1.06-5) is to be installed. dpkg: error processing /var/cache/apt/archives/qmail-uids-gids_1.06-5_all.deb (--unpack): conflicting packages - not installing qmail-uids-gids dpkg: regarding .../qmail-run_2.0.2_all.deb containing qmail-run: qmail-run conflicts with mail-transport-agent qmail provides mail-transport-agent and is present and installed. dpkg: error processing /var/cache/apt/archives/qmail-run_2.0.2_all.deb (--unpack): conflicting packages - not installing qmail-run Errors were encountered while processing: /var/cache/apt/archives/qmail_1.06-5_i386.deb /var/cache/apt/archives/qmail-uids-gids_1.06-5_all.deb /var/cache/apt/archives/qmail-run_2.0.2_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
我剛剛跑了這個:
dpkg --configure -a
至少這讓我克服了 dpkg 的這個問題/錯誤。我迫切需要安裝一個自定義的 deb 包。
在嘗試安裝我的自定義 deb 包時,我收到了很多這樣的消息:
mycustompackage depends on libssl1.0.0 (>= 1.0.1t-1+deb7u1); however: Package libssl1.0.0:i386 is not configured yet.
我猜我的最後一批更新檔不知何故以錯誤結束,dpkg 不會讓我做任何其他事情。
我的 qmail(可能還有 snmpd)問題仍然存在,但我現在只需要“修復”dpkg。