web-dev-qa-db-ja.com

パッケージが保留されているため、19.04を19.10にアップグレードできません:libsnmp30

update-managerを実行して19.04を19.10にアップグレードすると、コンソールで次のようになります。

Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

do-release-upgradeを試す:

$ do-release-upgrade 
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

upgradeを試してみます:

$ Sudo apt-get upgrade 
The following packages have been kept back:
  libsnmp30
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

実際、何もインストールできないようです:

$ Sudo apt-get install emacs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libsnmp30 : Depends: libsensors5 (>= 1:3.5.0) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

--fix-brokenで試す:

$ Sudo apt --fix-broken install
Correcting dependencies... failed.
The following packages have unmet dependencies:
 libsnmp30 : Depends: libsensors5 (>= 1:3.5.0) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

とにかく、libsnmp30が原因のようです。 libsnmp30をインストールしようとすると、次のようになります。

$ Sudo apt-get install libsnmp30
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:
 libsnmp30 : Depends: libsensors5 (>= 1:3.5.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

次にlibsensors5を試します:

$ Sudo apt-get install libsensors5    
The following packages have unmet dependencies:
 libsensors5 : Depends: libsensors-config but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

次にlibsensors-configを試してみます。これは恐ろしい結果です。

$ Sudo apt-get install libsensors-config
The following additional packages will be installed:
  policykit-1-gnome
Suggested packages:
  lm-sensors
The following packages will be REMOVED:
  apturl cheese chrome-gnome-Shell colord default-jre deja-dup evolution-data-server gdm3 gir1.2-gst-plugins-base-1.0 gir1.2-mutter-2
  gir1.2-mutter-4 gir1.2-rb-3.0 gir1.2-totem-1.0 gnome-initial-setup gnome-online-accounts gnome-session-bin gnome-Shell gnome-Shell-extension-appindicator
  [ ... lots and lots of packages ... ]
The following NEW packages will be installed:
  libsensors-config policykit-1-gnome
0 upgraded, 2 newly installed, 120 to remove and 0 not upgraded.

ジークス!

より詳しい情報:

$ apt-cache policy libsnmp30
libsnmp30:
  Installed: 5.7.3+dfsg-1.8ubuntu3.1
  Candidate: 5.7.3+dfsg-5ubuntu1.2
  Version table:
     5.7.3+dfsg-5ubuntu1.2 500
        500 http://se.archive.ubuntu.com/ubuntu disco-updates/main AMD64 Packages
     5.7.3+dfsg-5ubuntu1 500
        500 http://se.archive.ubuntu.com/ubuntu disco/main AMD64 Packages
 *** 5.7.3+dfsg-1.8ubuntu3.1 100
        100 /var/lib/dpkg/status

Libsensors情報:

$ apt-cache policy libsensors5 libsensors-config
libsensors5:
  Installed: (none)
  Candidate: 1:3.5.0-3ubuntu1
  Version table:
     1:3.5.0-3ubuntu1 500
        500 http://se.archive.ubuntu.com/ubuntu disco/main AMD64 Packages
libsensors-config:
  Installed: (none)
  Candidate: 1:3.5.0-3ubuntu1
  Version table:
     1:3.5.0-3ubuntu1 500
        500 http://se.archive.ubuntu.com/ubuntu disco/main AMD64 Packages
        500 http://se.archive.ubuntu.com/ubuntu disco/main i386 Packages

libsensors4を削除しています:

$ Sudo apt remove libsensors4
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libgl1-mesa-dri : Depends: libsensors4 (>= 1:3.0.0) but it is not going to be installed
 libsensors-config : Conflicts: libsensors4:i386 but 1:3.4.0-4 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

libgl1-mesa-driに関する情報:

$ apt-cache policy libgl1-mesa-dri
libgl1-mesa-dri:
  Installed: 19.3~git1908270730.e6eb44~oibaf~b
  Candidate: 19.3~git1908270730.e6eb44~oibaf~b
  Version table:
 *** 19.3~git1908270730.e6eb44~oibaf~b 100
        100 /var/lib/dpkg/status
     19.0.8-0ubuntu0~19.04.1 500
        500 http://se.archive.ubuntu.com/ubuntu disco-updates/main AMD64 Packages
     19.0.2-1ubuntu1 500
        500 http://se.archive.ubuntu.com/ubuntu disco/main AMD64 Packages
10
Martin Wickman

ppaがインストールされていて、ある時点(おそらく以前のUbuntuアップグレード)で削除されていましたが、そのppaからインストールされたパッケージがまだシステムに残っているため、依存関係の問題が発生します。

あなたのapt出力から、それは ppa:oibaf/graphics-drivers のようです。

同じppaをもう一度追加してみてください。宇宙で使用できるようです:

Sudo add-apt-repository ppa:oibaf/graphics-drivers

次に実行します

Sudo apt --fix-broken install

それが機能した場合、ppa-purgeを使用したい場合は、そのppaとそのすべてのパッケージを削除できます。

Sudo apt install ppa-purge
Sudo ppa-purge ppa:oibaf/graphics-drivers

最後に、参照されていないパッケージを削除します。

Sudo apt autoremove
17
pLumo