sudo apt upgrade
Raspberry 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이 다시 작동하면 이전 줄의 주석 처리를 해제하여 활성화할 수 있습니다.데브 컨퍼런스물러서세요.