Dpkgは '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so'をロードできません。

Dpkgは '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so'をロードできません。

sudo apt upgradeRaspberry PiシステムでRaspbian Busterを実行しようとすると、dpkg次の設定時にエラーが発生しますopenssh-server

$ sudo apt upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  rpi.gpio-common
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
debconf: Perl may be unconfigured (Can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so: invalid ELF header at /usr/share/perl/5.28/XSLoader.pm line 93.
  at /usr/lib/arm-linux-gnueabihf/perl/5.28/Fcntl.pm line 11.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/Seekable.pm line 11.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/Seekable.pm line 11.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/File.pm line 10.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/File.pm line 10.
Compilation failed in require at /usr/share/perl/5.28/FileHandle.pm line 9.
Compilation failed in require at (eval 1) line 3.
BEGIN failed--compilation aborted at (eval 1) line 3.
) -- aborting
Setting up openssh-server (1:7.9p1-10+deb10u1) ...
Can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so: invalid ELF header at /usr/share/perl/5.28/XSLoader.pm line 93.
  at /usr/lib/arm-linux-gnueabihf/perl/5.28/Fcntl.pm line 11.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 11.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 17.
Compilation failed in require at /usr/share/perl5/Debconf/Template.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Template.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/Question.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Question.pm line 8.
Compilation failed in require at /usr/share/perl5/Debconf/Config.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Config.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 10.
Compilation failed in require at /usr/share/perl5/Debconf/Db.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Db.pm line 7.
Compilation failed in require at /usr/share/debconf/frontend line 6.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6.
dpkg: error processing package openssh-server (--configure):
 installed openssh-server package post-installation script subprocess returned error exit status 255
dpkg: dependency problems prevent configuration of ssh:
 ssh depends on openssh-server (>= 1:7.9p1-10+deb10u1); however:
  Package openssh-server is not configured yet.

dpkg: error processing package ssh (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 openssh-server
 ssh
E: Sub-process /usr/bin/dpkg returned an error code (1)

設定の問題を暗示するエラー行を見た後、これを試しましたが、同じsudo dpkg --configure -a出力が再び得られました。

$ sudo dpkg --configure -a
Setting up openssh-server (1:7.9p1-10+deb10u1) ...
Can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so: invalid ELF header at /usr/share/perl/5.28/XSLoader.pm line 93.
  at /usr/lib/arm-linux-gnueabihf/perl/5.28/Fcntl.pm line 11.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 11.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 17.
Compilation failed in require at /usr/share/perl5/Debconf/Template.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Template.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/Question.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Question.pm line 8.
Compilation failed in require at /usr/share/perl5/Debconf/Config.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Config.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 10.
Compilation failed in require at /usr/share/perl5/Debconf/Db.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Db.pm line 7.
Compilation failed in require at /usr/share/debconf/frontend line 6.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6.
dpkg: error processing package openssh-server (--configure):
 installed openssh-server package post-installation script subprocess returned error exit status 255
dpkg: dependency problems prevent configuration of ssh:
 ssh depends on openssh-server (>= 1:7.9p1-10+deb10u1); however:
  Package openssh-server is not configured yet.

dpkg: error processing package ssh (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 openssh-server
 ssh

openssh-server私はLinuxパッケージの構成とパッケージのあいまいさについてはまったく知らない人です。同様の問題と考えられる解決策を説明する文献やフォーラムの投稿はオンラインで見つかりません。この明らかなライブラリの競合をどのように解決しますか?

編集する:

$ sudo apt --reinstall install perl-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  rpi.gpio-common
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 1,352 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://mirror.os6.org/raspbian/raspbian buster/main armhf perl-base armhf 5.28.1-6 [1,352 kB]
Fetched 1,352 kB in 1s (1,069 kB/s)
debconf: Perl may be unconfigured (Can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so: invalid ELF header at /usr/share/perl/5.28/XSLoader.pm line 93.
  at /usr/lib/arm-linux-gnueabihf/perl/5.28/Fcntl.pm line 11.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/Seekable.pm line 11.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/Seekable.pm line 11.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/File.pm line 10.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/File.pm line 10.
Compilation failed in require at /usr/share/perl/5.28/FileHandle.pm line 9.
Compilation failed in require at (eval 1) line 3.
BEGIN failed--compilation aborted at (eval 1) line 3.
) -- aborting
(Reading database ... 43627 files and directories currently installed.)
Preparing to unpack .../perl-base_5.28.1-6_armhf.deb ...
Unpacking perl-base (5.28.1-6) over (5.28.1-6) ...
Setting up perl-base (5.28.1-6) ...
Setting up openssh-server (1:7.9p1-10+deb10u1) ...
Can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so: invalid ELF header at /usr/share/perl/5.28/XSLoader.pm line 93........................]
  at /usr/lib/arm-linux-gnueabihf/perl/5.28/Fcntl.pm line 11........................................................]
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 11............................]
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 17........................]
Compilation failed in require at /usr/share/perl5/Debconf/Template.pm line 7........................................]
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Template.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/Question.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Question.pm line 8.
Compilation failed in require at /usr/share/perl5/Debconf/Config.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Config.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 10.
Compilation failed in require at /usr/share/perl5/Debconf/Db.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Db.pm line 7.
Compilation failed in require at /usr/share/debconf/frontend line 6.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6.
dpkg: error processing package openssh-server (--configure):
 installed openssh-server package post-installation script subprocess returned error exit status 255
dpkg: dependency problems prevent configuration of ssh:
 ssh depends on openssh-server (>= 1:7.9p1-10+deb10u1); however:
  Package openssh-server is not configured yet.

dpkg: error processing package ssh (--configure):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.8.5-2) ...
Illegal instruction
Errors were encountered while processing:
 openssh-server
 ssh
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ ls /usr/bin/ -lah | grep perl
-rwxr-xr-x  2 root root    2.8M Mar 31  2019 perl
-rwxr-xr-x  2 root root    2.8M Mar 31  2019 perl5.28.1
-rwxr-xr-x  1 root root    5.5K Mar 31  2019 perl5.28-arm-linux-gnueabihf
-rwxr-xr-x  2 root root     46K Mar 31  2019 perlbug
-rwxr-xr-x  1 root root     125 Mar 31  2019 perldoc
-rwxr-xr-x  1 root root     11K Mar 31  2019 perlivp
-rwxr-xr-x  2 root root     46K Mar 31  2019 perlthanks

ベストアンサー1

この問題は、PerlとPerlの間の鶏と卵の問題が原因であるようです。デブカンファレンスデブカンファレンスパッケージがインストール中ではなく最初に構成の問題を選択できるようにするオプション機能。重要ではないので、他の場所に移動することができます。

Debian 9または10システムでは、呼び出しの設定は次のとおりです/etc/apt/apt.conf.d/70debconf

// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};

したがって、DPkg::Pre-Install-Pkgs上記の行をコメントアウトしてください。

エラーメッセージを見ると、パッケージはlibperl5.28破損した内容がある可能性があります。perl-base再インストールするか簡単:

apt-get --fix-broken --reinstall install perl-base libperl5.28

または、簡単また、Perlとチョークが必要です。自分で試してみてください。包装袋ダウンロード後:

dpkg -i /var/cache/apt/archives/libperl5.28_5.28.1-6_armhf.deb

より多くのエラーが発生した場合は、以前にシステムに他の問題が発生したことを意味できますが、質問には記載されていません。システムにどのような問題が発生したかを事前に知っておくと、問題を解決するのに役立ちます。

Perlが再び機能する場合は、前の行のコメントを外してアクティブにすることができます。デブカンファレンス退いてください。

おすすめ記事