X

Debian linux - sysv-rc dependency-based boot system 修復

Debian linux 做 apt-get dist-upgrade, 升級到 sysv-rc 時, 出現下述訊息:

  • sysv-rc

    Unable to migrate to dependency-based boot system
    Tests have determined that problems in the boot system exist which prevent migration to dependency-based
    boot sequencing:
    package exim4-base removed but not purged, package mysql-server-5.0 removed but not purged

    If the reported problem is a local modification, it needs to be fixed manually. If it's a bug in the package, it should be reported to the BTS and fixed in the package.
    See http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for more information about how to fix the problems preventing migration.
    To reattempt the migration process after the problems have been fixed, run "dpkg-reconfigure sysv-rc".

問題出在 沒有把 exim4-base、mysql-server-5.0 移除乾淨. (移除乾淨要用 apt-get remove --purge exim4-base mysql-server-5.0)

解法文件

  • 說明文件說可以參照此文: LSBInitScripts/Dependency based boot sequence, 全部修正完畢後, 再執行 dpkg-reconfigure sysv-rc 即可.
  • 不過不喜歡文件中的方法, 所以決定將這些手動移除, 移除完後再執行 dpkg-reconfigure sysv-rc.

exim4-base 和 mysql-server-5.0 相關檔案

  • dpkg-query -W -f='${Conffiles}\n' exim4-base

    /etc/init.d/exim4 5cc0235f0daea6b711879c2aa6d017f7
    /etc/logrotate.d/exim4-base cd9fc4ad67f13176c098fab4bbcd32b5
    /etc/logrotate.d/exim4-paniclog 27d670010e80246c4a1dd89419589009
    /etc/cron.daily/exim4-base 7c4bb303fbaba1d038e5dfe60dcb656d

  • dpkg-query -W -f='${Conffiles}\n' mysql-server-5.0

    /etc/init.d/mysql-ndb-mgm becae0693dae627e6960249ae17bae19
    /etc/init.d/mysql-ndb 25ad87aee00cf24aea5daf7ad4ed899f
    /etc/init.d/mysql 246ab7d69e00af14f03d12c54465b59c
    /etc/logrotate.d/mysql-server 64e209fe34f73fbf10c9479bf30947c4
    /etc/mysql/debian-start 4272e4d740c8ae651ac35bbf4d2ed6dc
    /etc/logcheck/ignore.d.workstation/mysql-server-5_0 20ccf274886d8f2897a10d9288579410
    /etc/logcheck/ignore.d.server/mysql-server-5_0 20ccf274886d8f2897a10d9288579410
    /etc/logcheck/ignore.d.paranoid/mysql-server-5_0 e8dbe35695437354553e61fd65b702ba

  • dpkg -S /etc/mysql # 查詢 /etc/mysql 屬於哪些套件

    mysql-common, mysql-server-5.1: /etc/mysql

解決步驟

  1. sudo dpkg --purge exim4-base mysql-server-5.0 # 移除 exim4-base、mysql-server-5.0
  2. 註: 若用 apt-get remove --purge mysql-server-5.0 會連 mysql-server-5.1 一起移除.
  3. dpkg-reconfigure sysv-rc # 建議先看 /usr/share/doc/sysv-rc/README.Debian, 確定要使用 sysv-rc, 則再執行一次此命令
  4. dpkg-reconfigure sysv-rc

相關網頁

Tsung: 對新奇的事物都很有興趣, 喜歡簡單的東西, 過簡單的生活.
Related Post