内核更新删除了 Xorg

内核更新删除了 Xorg

我在 Crunchbang++ 上使用 AMD R9 270,这是一个基于 Debian Jessie 的发行版。要安装 AMD 驱动程序,我需要更新的内核。因此,正如人们所认为的那样,我在sources.list 中将“jessie”更改为“stretch”。虽然我目前正在使用集成显卡运行。现在,当我想将内核升级到新版本时,它说需要删除 Xorg。这是输出:

root@cbpp-maarten:/home/maarten/fglrx-15.302# apt-get install linux-headers-4.7.0-1-amd64 linux-image-4.7.0-1-amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libboost-system1.55.0 libboost-thread1.55.0 libcamel-1.2-49 libdrm-amdgpu1
  libebackend-1.2-7 libecal-1.2-16 libedataserver-1.2-18 libgdata-common
  libgdata22 libgnutls30 libhogweed4 libical1a libimobiledevice6 libinput-bin
  libinput10 libip4tc0 libjansson4 libnettle6 libnm0 libnma-common libnma0
  liboauth0 libplist3 libprotobuf9 libreadline7 libseccomp2 libusbmuxd4
  libuuid-perl libwacom-common libwacom2 libwebrtc-audio-processing-0
  mate-power-manager-common
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  bash-completion binutils console-setup console-setup-linux cpp-5 dbus
  evolution-data-server-common firmware-linux-free gcc-5 gcc-5-base gcc-6-base
  init init-system-helpers irqbalance kbd keyboard-configuration klibc-utils
  libabiword-3.0 libapparmor1 libasan2 libatomic1 libboost-atomic1.61.0
  libboost-chrono1.61.0 libboost-date-time1.61.0 libboost-filesystem1.61.0
  libboost-system1.61.0 libboost-thread1.61.0 libc-bin libc-dev-bin libc-l10n
  libc6 libc6-dev libcamel-1.2-59 libcc1-0 libcilkrts5 libdbus-1-3
  libdrm-amdgpu1 libdrm2 libebackend-1.2-10 libebook-1.2-16
  libebook-contacts-1.2-2 libecal-1.2-19 libedata-book-1.2-25
  libedataserver-1.2-22 libfdisk1 libfuse2 libgcc-5-dev libgcc1 libgcrypt20
  libgdata-common libgdata22 libglib2.0-0 libgnutls30 libgomp1 libgphoto2-6
  libgphoto2-port12 libgssapi-krb5-2 libhogweed4 libical2 libicu57
  libimobiledevice6 libinput-bin libinput10 libip4tc0 libisl15 libitm1
  libjansson4 libjson-c3 libk5crypto3 libklibc libkrb5-3 libkrb5support0
  liblsan0 libltdl7 libmount1 libmpfr4 libmpx0 libmtp9 libncurses5
  libncursesw5 libnettle6 libnm0 libnma-common libnma0 libnuma1 liboauth0
  liborc-0.4-0 libp11-kit0 libphonenumber7 libplist3 libpng16-16 libprotobuf10
  libpulse-mainloop-glib0 libpulse0 libpulsedsp libquadmath0 libreadline7
  libseccomp2 libsepol1 libsmartcols1 libsoxr0 libssl1.0.2 libstdc++6
  libtasn1-6 libtinfo5 libtsan0 libubsan0 libusbmuxd4 libwacom-common
  libwacom2 libwebrtc-audio-processing1 libxkbcommon0 linux-base
  linux-compiler-gcc-5-x86 linux-headers-4.7.0-1-common linux-kbuild-4.7
  linux-libc-dev locales makedev mate-power-manager-common mount
  p11-kit-modules pulseaudio pulseaudio-utils screen sysvinit-utils util-linux
  xserver-common
Suggested packages:
  binutils-doc gcc-5-locales gcc-5-multilib gcc-5-doc libgcc1-dbg libgomp1-dbg
  libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg
  libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg glibc-doc
  rng-tools gnutls-bin gphoto2 krb5-doc krb5-user libusbmuxd-tools
  linux-doc-4.7 debian-kernel-handbook nfs-common pavumeter paman paprefs
  byobu screenie iselect ncurses-term dosfstools
Recommended packages:
  manpages-dev libglib2.0-data xdg-user-dirs libgphoto2-l10n usbmuxd
  krb5-locales libmtp-runtime libwacom-bin rtkit
The following packages will be REMOVED:
  cbpp-exit fuse fusesmb gvfs gvfs-backends gvfs-daemons gvfs-fuse
  libboost-date-time1.55.0 libebook-1.2-14 libebook-contacts-1.2-0
  libedata-book-1.2-20 libpam-systemd libphonenumber6 mate-power-manager
  network-manager network-manager-gnome policykit-1 policykit-1-gnome sshfs
  udisks udisks2 upower xorg xserver-xorg xserver-xorg-core
  xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-mouse
  xserver-xorg-input-synaptics xserver-xorg-input-vmmouse
  xserver-xorg-video-all xserver-xorg-video-ati xserver-xorg-video-cirrus
  xserver-xorg-video-fbdev xserver-xorg-video-intel xserver-xorg-video-mach64
  xserver-xorg-video-mga xserver-xorg-video-modesetting
  xserver-xorg-video-neomagic xserver-xorg-video-nouveau
  xserver-xorg-video-openchrome xserver-xorg-video-r128
  xserver-xorg-video-radeon xserver-xorg-video-savage
  xserver-xorg-video-siliconmotion xserver-xorg-video-sisusb
  xserver-xorg-video-tdfx xserver-xorg-video-trident xserver-xorg-video-vesa
  xserver-xorg-video-vmware
The following NEW packages will be installed:
  cpp-5 firmware-linux-free gcc-5 gcc-5-base gcc-6-base irqbalance
  libapparmor1 libasan2 libboost-atomic1.61.0 libboost-chrono1.61.0
  libboost-date-time1.61.0 libboost-filesystem1.61.0 libboost-system1.61.0
  libboost-thread1.61.0 libc-l10n libcamel-1.2-59 libcc1-0 libdrm-amdgpu1
  libebackend-1.2-10 libebook-1.2-16 libebook-contacts-1.2-2 libecal-1.2-19
  libedata-book-1.2-25 libedataserver-1.2-22 libfdisk1 libgcc-5-dev
  libgdata-common libgdata22 libgnutls30 libgphoto2-port12 libhogweed4
  libical2 libicu57 libimobiledevice6 libinput-bin libinput10 libip4tc0
  libisl15 libjansson4 libjson-c3 libmpx0 libnettle6 libnm0 libnma-common
  libnma0 libnuma1 liboauth0 libphonenumber7 libplist3 libpng16-16
  libprotobuf10 libreadline7 libseccomp2 libsoxr0 libssl1.0.2 libusbmuxd4
  libwacom-common libwacom2 libwebrtc-audio-processing1
  linux-compiler-gcc-5-x86 linux-headers-4.7.0-1-amd64
  linux-headers-4.7.0-1-common linux-image-4.7.0-1-amd64 linux-kbuild-4.7
  makedev
The following packages will be upgraded:
  bash-completion binutils console-setup console-setup-linux dbus
  evolution-data-server-common init init-system-helpers kbd
  keyboard-configuration klibc-utils libabiword-3.0 libatomic1 libc-bin
  libc-dev-bin libc6 libc6-dev libcilkrts5 libdbus-1-3 libdrm2 libfuse2
  libgcc1 libgcrypt20 libglib2.0-0 libgomp1 libgphoto2-6 libgssapi-krb5-2
  libitm1 libk5crypto3 libklibc libkrb5-3 libkrb5support0 liblsan0 libltdl7
  libmount1 libmpfr4 libmtp9 libncurses5 libncursesw5 liborc-0.4-0 libp11-kit0
  libpulse-mainloop-glib0 libpulse0 libpulsedsp libquadmath0 libsepol1
  libsmartcols1 libstdc++6 libtasn1-6 libtinfo5 libtsan0 libubsan0
  libxkbcommon0 linux-base linux-libc-dev locales mate-power-manager-common
  mount p11-kit-modules pulseaudio pulseaudio-utils screen sysvinit-utils
  util-linux xserver-common
65 upgraded, 65 newly installed, 50 to remove and 800 not upgraded.
Need to get 118 MB of archives.
After this operation, 292 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

我不知道为什么它要删除 Xorg。有谁知道为什么这样做?

答案1

看来您将源代码切换到了stretch,但在尝试升级内核之前没有升级操作系统的其余部分。

在这种情况下,linux-image-4.7.0-1-amd64 软件包依赖于 xserver-xorg-input-vmmouse

# apt-cache depends linux-image-4.7.0-1-amd64
...
  Breaks: xserver-xorg-input-vmmouse
...

依赖解析器已被告知要安装内核,必须完全删除此软件包。然而,目前还有其他软件包依赖于它。

# apt-cache rdepends xserver-xorg-input-vmmouse
xserver-xorg-input-vmmouse
Reverse Depends:
  xserver-xorg-core
  xserver-xorg-input-all
  xserver-xorg-core
  open-vm-tools-desktop
  linux-image-4.7.0-1-amd64
  linux-image-4.7.0-1-amd64-unsigned

如果您执行此操作,apt-get dist-upgrade您会发现此软件包已被删除,因为它已过时。Debian Bug 报告日志 - #831420

root@a6ce0d85df50:/# apt-get dist-upgrade
...
The following packages will be REMOVED:
  xserver-xorg-input-vmmouse xserver-xorg-video-modesetting xserver-xorg-video-siliconmotion

将 xserver-xorg-* 软件包升级到不再依赖 vmmouse 的版本后,您的新内核应该可以正常安装,而无需删除 xorg。

答案2

因此,正如人们所认为的那样,我在 resources.list 中将“jessie”更改为“stretch”

不,请不要仅仅为了升级内核而更改版本,它的影响比我想象的要广泛得多。

要升级内核,最简单、最安全的方法是使用杰西向后移植

首先,您需要恢复到 Jessie in sources.list,并将 Jessie 反向移植添加到您的存储库(如果尚不存在):

echo deb http://http.debian.net/debian jessie-backports main > /etc/apt/sources.list.d/jessie-backports.list

(作为根),然后

apt-get update
apt-get -t jessie-backports install linux-image-amd64

将安装当前默认的向后移植内核(截至撰写本文时为 4.7)。

启用向后移植是安全的:较新的软件包不会自动从向后移植中选取,您需要使用-t jessie-backports上面的方法显式选择它们(但是一旦完成此操作,升级后的软件包的更新将由 选取apt-get upgrade)。

相关内容