升级 freetype 需要删除其他软件包

升级 freetype 需要删除其他软件包

libfreetype6和软件包的新版本libfreetype6-dev可用于修复[USN-3263-1] FreeType vulnerability。当我尝试正常升级时,这些软件包被阻止:

user@host:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libfreetype6 libfreetype6-dev
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

如果我尝试libfreetype6手动升级,很多软件包会被标记为删除:

user@host:~$ sudo apt-get install libfreetype6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fonts-horai-umefont fonts-unfonts-core glib-networking:i386
  gnome-exe-thumbnailer icoutils libaio1:i386 libasn1-8-heimdal:i386
  libasound2:i386 libasound2-plugins:i386 libasyncns0:i386
  libatk-bridge2.0-0:i386 libatk1.0-0:i386 libatspi2.0-0:i386
  libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386
  libboost-filesystem1.58.0:i386 libboost-system1.58.0:i386 libcapi20-3
  libcapi20-3:i386 libcolord2:i386 libcups2:i386 libdatrie1:i386 libdb5.3:i386
  libdbus-1-3:i386 libegl1-mesa:i386 libepoxy0:i386 libexif12:i386
  libflac8:i386 libgbm1:i386 libgdk-pixbuf2.0-0:i386 libgif7:i386
  libglib2.0-0:i386 libglu1-mesa:i386 libgmp10:i386 libgnutls30:i386
  libgphoto2-port12:i386 libgraphite2-3:i386 libgssapi-krb5-2:i386
  libgssapi3-heimdal:i386 libhcrypto4-heimdal:i386 libheimbase1-heimdal:i386
  libheimntlm0-heimdal:i386 libhogweed4:i386 libhx509-5-heimdal:i386
  libice6:i386 libicu55:i386 libidn11:i386 libieee1284-3:i386
  libjack-jackd2-0:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386
  libjson-c2:i386 libjson-glib-1.0-0:i386 libk5crypto3:i386 libkeyutils1:i386
  libkrb5-26-heimdal:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms2-2:i386
  libldap-2.4-2:i386 libltdl7:i386 libmirclient9:i386 libmircommon5:i386
  libmirprotobuf3:i386 libmpg123-0:i386 libnettle6:i386 libnotify4:i386
  libodbc1 libogg0:i386 libopenal1:i386 libosmesa6 libosmesa6:i386
  libp11-kit-gnome-keyring:i386 libp11-kit0:i386 libpango-1.0-0:i386
  libpixman-1-0:i386 libpng12-0:i386 libportaudio2:i386
  libprotobuf-lite9v5:i386 libproxy1v5:i386 libpulse0:i386 librest-0.7-0:i386
  libroken18-heimdal:i386 libsamplerate0:i386 libsasl2-2:i386
  libsasl2-modules:i386 libsasl2-modules-db:i386 libsdl2-2.0-0:i386
  libsm6:i386 libsndfile1:i386 libsndio6.1:i386 libsoundtouch1:i386
  libsoup-gnome2.4-1:i386 libsoup2.4-1:i386 libspeexdsp1:i386
  libsqlite3-0:i386 libssl1.0.0:i386 libsystemd0:i386 libtasn1-6:i386
  libthai0:i386 libtiff5:i386 libusb-1.0-0:i386 libv4l-0:i386
  libv4lconvert0:i386 libvorbis0a:i386 libvorbisenc2:i386 libvpx3:i386
  libwayland-client0:i386 libwayland-cursor0:i386 libwayland-egl1-mesa:i386
  libwayland-server0:i386 libwind0-heimdal:i386 libwrap0:i386
  libwxbase3.0-0v5:i386 libxcb-render0:i386 libxcb-shm0:i386
  libxcb-xfixes0:i386 libxcomposite1:i386 libxcursor1:i386 libxi6:i386
  libxkbcommon0:i386 libxml2:i386 libxpm4:i386 libxrandr2:i386
  libxrender1:i386 libxslt1.1:i386 libxss1:i386 libxt6:i386
  ocl-icd-libopencl1:i386 odbcinst odbcinst1debian2 p11-kit-modules:i386 p7zip
  unixodbc wine-gecko2.21 wine-gecko2.21:i386 wine-mono0.0.8 winetricks
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libfreetype6-dev
The following packages will be REMOVED:
  libcairo-gobject2:i386 libcairo2:i386 libfontconfig1:i386 libfreetype6:i386
  libgd3:i386 libgphoto2-6:i386 libgtk-3-0:i386 libgtk2.0-0:i386
  libharfbuzz0b:i386 libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386
  libsane:i386 libwxgtk3.0-0v5:i386 notification-daemon:i386 pcsx2:i386 wine
  wine1.6 wine1.6-amd64 wine1.6-i386:i386
The following packages will be upgraded:
  libfreetype6 libfreetype6-dev
2 upgraded, 0 newly installed, 19 to remove and 0 not upgraded.
Need to get 1,271 kB of archives.
After this operation, 309 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

尝试 dist-upgrade 产生类似的结果:

user@host:~$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  fonts-horai-umefont fonts-unfonts-core glib-networking:i386
  gnome-exe-thumbnailer icoutils libaio1:i386 libasn1-8-heimdal:i386
  libasound2:i386 libasound2-plugins:i386 libasyncns0:i386
  libatk-bridge2.0-0:i386 libatk1.0-0:i386 libatspi2.0-0:i386
  libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386
  libboost-filesystem1.58.0:i386 libboost-system1.58.0:i386 libcapi20-3
  libcapi20-3:i386 libcolord2:i386 libcups2:i386 libdatrie1:i386 libdb5.3:i386
  libdbus-1-3:i386 libegl1-mesa:i386 libepoxy0:i386 libexif12:i386
  libflac8:i386 libgbm1:i386 libgdk-pixbuf2.0-0:i386 libgif7:i386
  libglib2.0-0:i386 libglu1-mesa:i386 libgmp10:i386 libgnutls30:i386
  libgphoto2-port12:i386 libgraphite2-3:i386 libgssapi-krb5-2:i386
  libgssapi3-heimdal:i386 libhcrypto4-heimdal:i386 libheimbase1-heimdal:i386
  libheimntlm0-heimdal:i386 libhogweed4:i386 libhx509-5-heimdal:i386
  libice6:i386 libicu55:i386 libidn11:i386 libieee1284-3:i386
  libjack-jackd2-0:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386
  libjson-c2:i386 libjson-glib-1.0-0:i386 libk5crypto3:i386 libkeyutils1:i386
  libkrb5-26-heimdal:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms2-2:i386
  libldap-2.4-2:i386 libltdl7:i386 libmirclient9:i386 libmircommon5:i386
  libmirprotobuf3:i386 libmpg123-0:i386 libnettle6:i386 libnotify4:i386
  libodbc1 libogg0:i386 libopenal1:i386 libosmesa6 libosmesa6:i386
  libp11-kit-gnome-keyring:i386 libp11-kit0:i386 libpango-1.0-0:i386
  libpixman-1-0:i386 libpng12-0:i386 libportaudio2:i386
  libprotobuf-lite9v5:i386 libproxy1v5:i386 libpulse0:i386 librest-0.7-0:i386
  libroken18-heimdal:i386 libsamplerate0:i386 libsasl2-2:i386
  libsasl2-modules:i386 libsasl2-modules-db:i386 libsdl2-2.0-0:i386
  libsm6:i386 libsndfile1:i386 libsndio6.1:i386 libsoundtouch1:i386
  libsoup-gnome2.4-1:i386 libsoup2.4-1:i386 libspeexdsp1:i386
  libsqlite3-0:i386 libssl1.0.0:i386 libsystemd0:i386 libtasn1-6:i386
  libthai0:i386 libtiff5:i386 libusb-1.0-0:i386 libv4l-0:i386
  libv4lconvert0:i386 libvorbis0a:i386 libvorbisenc2:i386 libvpx3:i386
  libwayland-client0:i386 libwayland-cursor0:i386 libwayland-egl1-mesa:i386
  libwayland-server0:i386 libwind0-heimdal:i386 libwrap0:i386
  libwxbase3.0-0v5:i386 libxcb-render0:i386 libxcb-shm0:i386
  libxcb-xfixes0:i386 libxcomposite1:i386 libxcursor1:i386 libxi6:i386
  libxkbcommon0:i386 libxml2:i386 libxpm4:i386 libxrandr2:i386
  libxrender1:i386 libxslt1.1:i386 libxss1:i386 libxt6:i386
  ocl-icd-libopencl1:i386 odbcinst odbcinst1debian2 p11-kit-modules:i386 p7zip
  unixodbc wine-gecko2.21 wine-gecko2.21:i386 wine-mono0.0.8 winetricks
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libcairo-gobject2:i386 libcairo2:i386 libfontconfig1:i386 libfreetype6:i386
  libgd3:i386 libgphoto2-6:i386 libgtk-3-0:i386 libgtk2.0-0:i386
  libharfbuzz0b:i386 libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386
  libsane:i386 libwxgtk3.0-0v5:i386 notification-daemon:i386 pcsx2:i386 wine
  wine1.6 wine1.6-amd64 wine1.6-i386:i386
The following packages will be upgraded:
  libfreetype6 libfreetype6-dev
2 upgraded, 0 newly installed, 19 to remove and 0 not upgraded.
Need to get 1,271 kB of archives.
After this operation, 309 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

输出apt-cache madison libfreetype6 | grep -vi source

user@host:~$ apt-cache madison libfreetype6 | grep -vi source
libfreetype6 | 2.6.1-0.1ubuntu2.2 | http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
libfreetype6 | 2.6.1-0.1ubuntu2.2 | http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
libfreetype6 | 2.6.1-0.1ubuntu2 | http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

我想保留标记为删除的 wine 包。查看wine1.6-amd64包的依赖关系显示这libfreetype6只是一个建议:

user@host:~$ apt-cache depends wine1.6-amd64
wine1.6-amd64
  PreDepends: dpkg
    dpkg:armhf
  Depends: libasound2
  Depends: libc6
  Depends: libgcc1
 |Depends: libglu1-mesa
  Depends: <libglu1>
    libglu1-mesa
  Depends: libgphoto2-6
  Depends: libgphoto2-port12
  Depends: liblcms2-2
  Depends: libldap-2.4-2
  Depends: libmpg123-0
  Depends: libopenal1
  Depends: libx11-6
  Depends: libxext6
  Depends: libxml2
 |Depends: ocl-icd-libopencl1
  Depends: <libopencl1>
    ocl-icd-libopencl1
    nvidia-libopencl1-304
    nvidia-libopencl1-340
    nvidia-libopencl1-370
    nvidia-libopencl1-375
    nvidia-libopencl1-378
    nvidia-libopencl1-381
 |Depends: ocl-icd-libopencl1
  Depends: <libopencl-1.1-1>
    ocl-icd-libopencl1
  Depends: zlib1g
  Depends: <wine1.6:any>
    wine1.6
  Depends: libncurses5
  Conflicts: <wine-amd64>
  Recommends: libasound2-plugins
  Recommends: libcapi20-3
  Recommends: libcups2
  Recommends: libdbus-1-3
 |Recommends: libfontconfig1
  Recommends: <libfontconfig>
    libfontconfig1
  Recommends: libfreetype6
  Recommends: libgif7
  Recommends: libgnutls30
  Recommends: libjpeg8
  Recommends: libosmesa6
  Recommends: libp11-kit-gnome-keyring
  Recommends: libpng12-0
  Recommends: libpulse0
  Recommends: libsane
  Recommends: libtiff5
  Recommends: libv4l-0
  Recommends: libxcomposite1
  Recommends: libxcursor1
  Recommends: libxi6
  Recommends: libxinerama1
  Recommends: libxrandr2
  Recommends: libxrender1
  Recommends: libxslt1.1
  Recommends: libxt6
  Recommends: libxxf86vm1
  Recommends: p11-kit-modules
  Recommends: unixodbc
  Recommends: wine-gecko2.21
  Recommends: wine-mono0.0.8
  Replaces: <wine-amd64>
    wine1.6-amd64
  Replaces: wine1.4-amd64
    wine1.6-amd64
  Replaces: <wine1.5-amd64>
    wine1.6-amd64

尝试libfreetype6手动删除会产生以下输出:

user@host:~$ sudo apt-get remove libfreetype6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ant : Depends: default-jre-headless but it is not going to be installed or
                java5-runtime-headless or
                java6-runtime-headless or
                java7-runtime-headless
 libqt5gui5 : Depends: fontconfig
              Depends: libfontconfig1 (>= 2.11.94) but it is not going to be installed
              Depends: libfreetype6 (>= 2.3.5) but it is not going to be installed
              Depends: libharfbuzz0b (>= 0.9.11) but it is not going to be installed
              Recommends: libqt5svg5 but it is not going to be installed
 libsane : Depends: libgphoto2-6 (>= 2.5.2) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

我怎样才能libfreetype6在不卸载 wine 的情况下升级软件包?

答案1

感谢@Ravexina 和@user.dz。

发现我的/etc/apt/sources.list/etc/apt/sources.list.d/*文件的形式为:

deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ xenial multiverse

将这些文件中的所有行更改为以下形式后:

deb [arch=amd64,i386] http://us.archive.ubuntu.com/ubuntu/ xenial multiverse

libfreetype6通过更新软件包并保留 wine,问题已得到解决。

[arch=amd64]过去曾将这些部分添加到这些文件中,以抑制我在更新软件包列表时收到的警告。根据Debian Multiarch 指南这将覆盖 dpkg 报告的默认体系结构。只需[arch=amd64]从所有行中删除该部分即可达到相同的效果,因为体系结构优先级由以下因素决定:

  1. [arch=]在 sources.list 中
  2. 适当设置:APT::Architecture=<arch>
  3. dpkg 设置:dpkg --print-foreign-architectures

相关内容