16.04からアップグレードされたUbuntu 18.04はupowerdをロードできず、libssl.so.1.0.2が見つかりませんでした。

16.04からアップグレードされたUbuntu 18.04はupowerdをロードできず、libssl.so.1.0.2が見つかりませんでした。

私は16.04が新しくインストールされ、リリースされてから実行されており、約1ヶ月前に公式アップグレードメカニズムを使用して18.04にアップグレードしました。システムログで以下を確認しました。

Sep 27 17:40:36 yavin systemd[1]: Starting Daemon for power management...
Sep 27 17:40:36 yavin upowerd[836]: /usr/lib/upower/upowerd: error while loading shared libraries: libssl.so.1.0.2: cannot open shared object fil
e: No such file or directory
Sep 27 17:40:36 yavin systemd[1]: upower.service: Main process exited, code=exited, status=127/n/a
Sep 27 17:40:36 yavin systemd[1]: upower.service: Failed with result 'exit-code'.
Sep 27 17:40:36 yavin systemd[1]: Failed to start Daemon for power management.
Sep 27 17:40:36 yavin systemd[1]: upower.service: Service hold-off time over, scheduling restart.
Sep 27 17:40:36 yavin systemd[1]: upower.service: Scheduled restart job, restart counter is at 1.
Sep 27 17:40:36 yavin systemd[1]: Stopped Daemon for power management.
Sep 27 17:40:36 yavin systemd[1]: Starting Daemon for power management...
Sep 27 17:40:36 yavin upowerd[846]: /usr/lib/upower/upowerd: error while loading shared libraries: libssl.so.1.0.2: cannot open shared object file: No such file or directory
Sep 27 17:40:36 yavin systemd[1]: upower.service: Main process exited, code=exited, status=127/n/a
Sep 27 17:40:36 yavin systemd[1]: upower.service: Failed with result 'exit-code'.
Sep 27 17:40:36 yavin systemd[1]: Failed to start Daemon for power management.
Sep 27 17:40:36 yavin systemd[1]: upower.service: Service hold-off time over, scheduling restart.
Sep 27 17:40:36 yavin systemd[1]: upower.service: Scheduled restart job, restart counter is at 2.

したがって、upowerdはlibssl.so.1.0.2を見つけることができません。もちろんそうです。

$ ldd -v /usr/lib/upower/upowerd | grep 'not found'
    libssl.so.1.0.2 => not found
    libcrypto.so.1.0.2 => not found
        libcrypto.so.1.0.2 (OPENSSL_1.0.2d) => not found
        libssl.so.1.0.2 (OPENSSL_1.0.2d) => not found

upowerdは18.04でもまだ使用されていますか?それでは、現在持っているupowerdとlibssl / libcryptoのバージョンと必要なバージョンを確認するか、強制的に再インストールするにはどうすればよいですか?

これが私がインストールしたようです:

$ sudo apt list --installed | grep "libssl"

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libssl-dev/now 1.1.0h-2.0+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,local]
libssl-doc/now 1.1.0h-2.0+ubuntu16.04.1+deb.sury.org+1 all [installed,local]
libssl1.0.0/bionic-updates,bionic-security,now 1.0.2n-1ubuntu5.1 amd64 [installed]
libssl1.1/now 1.1.0h-2.0+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,local]

そしてlibcrypto:

$ sudo apt list --installed | grep "crypto"

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libblockdev-crypto2/bionic,now 2.16-2 amd64 [installed]
libhcrypto4-heimdal/bionic,now 7.5.0+dfsg-1 amd64 [installed]
libk5crypto3/bionic,now 1.16-2build1 amd64 [installed,automatic]
python-crypto/bionic,now 2.6.1-8ubuntu2 amd64 [installed,automatic]
python3-asn1crypto/bionic,bionic,now 0.24.0-1 all [installed]
python3-crypto/bionic,now 2.6.1-8ubuntu2 amd64 [installed]
python3-cryptography/bionic-updates,bionic-security,now 2.1.4-1ubuntu1.2 amd64 [installed]

これはアップグレード前に発生した問題かもしれません。 upowerdがなければ、バッテリーの電源管理がなく、ラップトップの電源が突然オフになり、数回の動作が中断されました。アップグレード前にもこれが起こったことを覚えています。

編集する

要求どおりに以下を出力しますapt policy upower

upower:
  Installed: 0.99.7-2
  Candidate: 0.99.7-2
  Version table:
 *** 0.99.7-2 500
        500 http://ubuntu.ipserverone.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

編集2

apt再インストールを要求すると、upower同じパッケージがインストールされ、apt policy upower出力は変更されません。

$ sudo apt install --reinstall upower
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 45 not upgraded.
Need to get 102 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ubuntu.ipserverone.com/ubuntu bionic/main amd64 upower amd64 0.99.7-2 [102 kB]
Fetched 102 kB in 0s (381 kB/s)  
(Reading database ... 283627 files and directories currently installed.)
Preparing to unpack .../upower_0.99.7-2_amd64.deb ...
Unpacking upower (0.99.7-2) over (0.99.7-2) ...
Setting up upower (0.99.7-2) ...
upower.service is a disabled or a static unit not running, not starting it.
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...

$ sudo apt policy upower
upower:
  Installed: 0.99.7-2
  Candidate: 0.99.7-2
  Version table:
 *** 0.99.7-2 500
        500 http://ubuntu.ipserverone.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

設定された転送がないようで、バイナリはまだlibsslライブラリを見つけることができません。libcryptoupowerd

$ dpkg-divert --list /usr/lib/upower/upowerd

$ ldd -v /usr/lib/upower/upowerd | grep 'not found'
    libssl.so.1.0.2 => not found
    libcrypto.so.1.0.2 => not found
        libcrypto.so.1.0.2 (OPENSSL_1.0.2d) => not found
        libssl.so.1.0.2 (OPENSSL_1.0.2d) => not found

Ubuntu 18.04の新規インストールと比較を追加するように編集されました。

@stephen-kittはupowerdがlibsslに依存してはいけないと言ったので、18.04で新しい仮想マシンをインストールしましたが、確かにlddのリストが異なりました。

ノートパソコンに何か問題があることを除いてldd -v /usr/lib/upower/upowerd

ibffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007ff3f0466000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ff3f01f5000)
libssl.so.1.0.2 => not found
libcrypto.so.1.0.2 => not found
libusbmuxd.so.4 => /usr/lib/x86_64-linux-gnu/libusbmuxd.so.4 (0x00007ff3effed000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff3f2f14000)

新しい18.04のインストール

libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f4aa91de000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f4aa8f6c000)
libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f4aa8c07000)
libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f4aa89f4000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f4aa86d9000)
libusbmuxd.so.4 => /usr/lib/x86_64-linux-gnu/libusbmuxd.so.4 (0x00007f4aa84d1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4aabc8c000)

何らかの理由で、ラップトップはlibsslとlibcryptoに接続し、新しくインストールするとlibgnutls、libtasn1、libgcryptに接続します。

新規インストールに関するレポートは、まだapt policyノートパソコンと同じです。

$ apt policy upower
upower:
  Installed: 0.99.7-2
  Candidate: 0.99.7-2
  Version table:
 *** 0.99.7-2 500
        500 http://th.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

なぜこれが必要なのかわかりません。

すぐにラップトップを再インストールする予定です(geditなどのアプリをロードするのに長い遅延が発生するなどの他の問題があります)。しかし、この問題がどのように発生したのかを調べるのが良いでしょう。

ベストアンサー1

/usr/lib/upower/upowerdとにかく、次に含まれるファイルと一致しないバージョンで終わります。upowerパッケージ

この問題を解決するには、パッケージを再インストールします。

sudo apt install --reinstall upower

それでも役に立たない場合は、転送があることを確認してください。

dpkg-divert --list /usr/lib/upower/upowerd

転送が表示されたら、そのパッケージを確認、アップグレード、または削除する必要があります。

おすすめ記事