`apt dist-upgrade` 并不关心删除 upstart 并且想要安装 sysvinit...为什么?

`apt dist-upgrade` 并不关心删除 upstart 并且想要安装 sysvinit...为什么?

我运行了常规命令apt-get upgrade,然后运行了apt-get dist-upgrade。 像往常一样单击“是”后,dist-upgrade 开始删除许多重要的软件包,当我在终端中向上滚动时,我惊讶地看到了这一点:

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
 account-plugin-aim account-plugin-jabber account-plugin-salut
 account-plugin-yahoo accountsservice aisleriot aptdaemon apturl audacious
 avahi-daemon avahi-utils bluez bluez-alsa brasero checkbox-gui checkbox-ng
 checkbox-ng-service colord compiz compiz-gnome consolekit cron dbus dbus-x11
 deja-dup-backend-gvfs empathy exo-utils friendly-recovery gconf2 gcr gdm
 gksu gnome-applets gnome-applets-data gnome-bluetooth gnome-control-center
 gnome-disk-utility gnome-keyring gnome-media gnome-power-manager
 gnome-screensaver gnome-session gnome-session-bin gnome-session-flashback
 gnome-settings-daemon gnome-shell gnome-sushi gnome-system-log
 gnome-user-share gpointing-device-settings gstreamer0.10-gconf gvfs
 gvfs-backends gvfs-daemons gvfs-fuse hplip indicator-bluetooth
 indicator-datetime indicator-power indicator-session indicator-sound kate
 kde-runtime kdelibs5-plugins kdepim-runtime kleopatra konsole krdc
 kubuntu-debug-installer landscape-client-ui-install language-selector-common
 language-selector-gnome lib32nss-mdns libbonoboui2-0 libcalendarsupport4
 libcanberra-pulse libexo-1-0 libgarcon-1-0 libgksu2-0
 libgnome-media-profiles-3.0-0 libgnome2-0 libgnome2-bin libgnome2-common
 libgnomeui-0 libgnomevfs2-0 libgnomevfs2-common libincidenceeditorsng4
 libkateinterfaces4 libkdepim4 libkdepimdbusinterfaces4 libmailcommon4
 libmailimporter4 libmessagecomposer4 libmessagecore4 libmessageviewer4
 libnss-mdns libnss-mdns:i386 libnss-mdns-i386:i386 libpam-systemd
 libpimcommon4 libpolkit-qt-1-1 libqapt2-runtime libreoffice-gnome
 libswt-gnome-gtk-3-jni libtemplateparser4 libthunarx-2-0 libunique-1.0-0
 libxfce4ui-1-0 libxfce4ui-utils libxfconf-0-2 lightdm
 mcp-account-manager-uoa mountall nautilus nautilus-sendto
 nautilus-sendto-empathy nautilus-share network-manager network-manager-gnome
 nfs-common oneconf orage pidgin pidgin-libnotify plainbox-provider-checkbox
 plainbox-provider-resource-generic plymouth plymouth-label
 plymouth-theme-ubuntu-logo plymouth-theme-ubuntu-text policykit-1
 policykit-1-gnome printer-driver-postscript-hp pulseaudio
 pulseaudio-module-bluetooth pulseaudio-module-x11 python-secretstorage
 python-ubuntu-sso-client python3-checkbox-ng python3-checkbox-support
 python3-plainbox qapt-batch remmina remmina-plugin-rdp remmina-plugin-vnc
 rhythmbox rhythmbox-mozilla rhythmbox-plugin-cdrecorder
 rhythmbox-plugin-magnatune rhythmbox-plugin-zeitgeist rhythmbox-plugins
 seahorse sessioninstaller shotwell software-center sound-juicer
 systemd-services telepathy-salut thunar thunar-volman totem-mozilla
 transmission-gtk ubuntu-desktop ubuntu-minimal ubuntu-release-upgrader-gtk
 ubuntu-session ubuntu-sso-client ubuntu-sso-client-qt ubuntu-standard
 ubuntu-system-service udisks2 unity unity-control-center
 unity-control-center-signon unity-settings-daemon unity-tweak-tool
 update-manager update-notifier upower upstart ureadahead usb-creator-common
 usb-creator-gtk webaccounts-extension-common xdiagnose xfce4 xfce4-appfinder
 xfce4-mixer xfce4-notifyd xfce4-panel xfce4-session xfce4-settings
 xfce4-volumed xfconf xfdesktop4 xfwm4 xul-ext-webaccounts y-ppa-manager
The following NEW packages will be installed:
 apparmor-easyprof apparmor-easyprof-ubuntu click click-apparmor
 cryptsetup-bin gir1.2-click-0.4 gir1.2-gee-0.8 libclick-0.4-0
 libcontent-hub0 libcryptsetup4 liblttng-ust-ctl2 liblttng-ust0 libsctp1
 libupstart-app-launch2 liburcu1 linux-headers-3.13.0-73
 linux-headers-3.13.0-73-generic linux-image-3.13.0-73-generic
 linux-image-extra-3.13.0-73-generic lksctp-tools lxpolkit lxsession-data
 python3-apparmor python3-apparmor-click python3-click python3-libapparmor
 qtdeclarative5-ubuntu-content0.1 sysvinit
The following packages will be upgraded:
 linux-generic linux-headers-generic linux-image-generic openjdk-7-jdk
 openjdk-7-jre openjdk-7-jre-headless
6 upgraded, 28 newly installed, 198 to remove and 0 not upgraded.'

首先,它破坏了我的 aptitude。我检查了 apt 中的源文件,一切正常。当我尝试执行 时apt-get install -f,它用以下代码吓到我:

WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  sysvinit
0 upgraded, 7 newly installed, 1 to remove and 9 not upgraded.
2 not fully installed or removed.
Need to get 1,013 kB of archives.
After this operation, 4,424 kB of additional disk space will be used.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?] no 
Abort.

当 dist-upgrade 移除所有这些软件包以安装 sysvinit 时,我很乐意看到这一点。无论如何,由于它还破坏了我的网络,我不得不通过使用 USB 网络共享(主机的 USB)连接的客户机来路由主机,然后我恢复了所有这些软件包以使系统恢复稳定。

出于好奇,我尝试dist-upgrade再次执行,但结果仍然相同。我想运行 dist-upgrade 来升级这些软件包:linux-generic linux-headers-generic linux-image-generic openjdk-7-jdk openjdk-7-jre openjdk-7-jre-headless因为常规软件包apt-get upgrade不会触及它们。

我的第一个问题是:如何升级这些软件包而不删除其他心爱的软件包?

第二个问题显然是:导致系统不稳定是正常现象吗?如果删除的软件包与系统上要安装的dist-upgrade新软件包不兼容,难道不应该用更好的软件包来替代删除的软件包吗?dist-upgrade

关于possible duplicate标志:我过去一个月没有添加 PPA。

答案1

感谢 David 的指点和我过去几天对 sysvinit 的研究,我发现造成此问题的原因是这个 debian repo:deb http://ftp.de.debian.org/debian squeeze main

一旦我将其注释掉并更新源代码,我就会摆脱错误的dist-upgrade建议。

尽管我还没有完全弄清楚 sysvinit 和 upstart 之间的区别,但从我的研究中我所知道的是,当 Adam 还是个孩子的时候,Ubuntu 就用 (POSIX)upstart 取代了 sysvinit(尽管 Trusty 仍然有一个有效候选人对于 sysvinit 来说,删除 upstart 可能会引起麻烦,就像在我的系统上一样)。

$ cat /etc/apt/sources.list | egrep -v "^#|trusty|^$"
deb http://ftp.de.debian.org/debian squeeze main
deb http://www.emdebian.org/debian/ squeeze main

这基本上就是我找到不可信存储库的方法。只需注释掉第一个存储库即可。

如果您不小心删除了这些软件包,请不要重新启动系统,原因很明显;即使删除了这些软件包,桌面环境也足够强大,可以工作到重新启动为止。然后,尝试看看如何获​​取网络;如果没有控制中心并且系统上没有网络管理器,您能做的事情就很少了。我采用了一种破解方法,在 VirtualBox 上运行的虚拟机上使用两个网络接口,然后将主机(ubuntu)的流量路由到通过 USB 网络共享获取互联网的客户机。

然后当 aptitude 询问时,直接输入“是的,按我说的做!”:

After this operation, 4,424 kB of additional disk space will be used.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'

奇怪的是,aptitude 在删除 upstart 时甚至没有一点在意,但当涉及到 sysvinit 时却感到不安!

相关内容