web-dev-qa-db-ja.com

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

削除のマークが付いたワインパッケージを保管したい。 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.

Wineをアンインストールせずにlibfreetype6パッケージをアップグレードするにはどうすればよいですか?

3
Chase

@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 HOWTO によると、これはdpkgによって報告されるデフォルトのアーキテクチャを上書きします。すべての行から[Arch=AMD64]部分を削除するだけで、アーキテクチャの優先度が次のように決定されるのと同じ効果が得られます。

  1. sources.listの[Arch=]
  2. apt設定:APT::Architecture=<Arch>
  3. dpkg設定:dpkg --print-foreign-architectures
1
Chase