apt --fix-broken 설치가 Raspberry Pi에서 작동하지 않습니다

apt --fix-broken 설치가 Raspberry Pi에서 작동하지 않습니다

Raspberry Pi에 작은 문제가 있습니다. 패키지를 설치하려고 할 때마다 이런 일이 발생합니다.

pi@raspberrypi:~ $ sudo apt install openjdk-8-jre
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:
 chromium-browser : Depends: chromium-codecs-ffmpeg-extra (= 86.0.4240.197-rpt1) but 88.0.4324.187-rpt1 is to be installed or
                             chromium-codecs-ffmpeg (= 86.0.4240.197-rpt1) but it is not going to be installed
 chromium-browser-l10n : Depends: chromium-browser (>= 88.0.4324.187-rpt1) but 86.0.4240.197-rpt1 is to be installed
 libpython3.7-dev : Depends: libpython3.7-stdlib (= 3.7.3-2+deb10u2) but 3.7.3-2+deb10u3 is to be installed
                    Depends: libpython3.7 (= 3.7.3-2+deb10u2) but 3.7.3-2+deb10u3 is to be installed
 openjdk-8-jre : Depends: openjdk-8-jre-headless (= 8u212-b01-1+rpi1) but it is not going to be installed
                 Depends: libatk-wrapper-java-jni (>= 0.33.3-9~) but it is not going to be installed
                 Recommends: fonts-dejavu-extra but it is not going to be installed
 python3.7-dev : Depends: libpython3.7-dev (= 3.7.3-2+deb10u3) but 3.7.3-2+deb10u2 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

다음을 실행할 때 apt --fix-broken install이런 일이 발생합니다 .

pi@raspberrypi:~ $ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  chromium-browser libpython3.7-dev
Suggested packages:
  webaccounts-chromium-extension unity-chromium-extension adobe-flashplugin
The following packages will be upgraded:
  chromium-browser libpython3.7-dev
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/151 MB of archives.
After this operation, 5,602 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg-deb (subprocess): cannot copy archive member from '/var/cache/apt/archives/chromium-browser_88.0.4324.187-rpt1_armhf.deb' to decompressor pipe: failed to write (Broken pipe)
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg-deb (subprocess): cannot copy archive member from '/var/cache/apt/archives/libpython3.7-dev_3.7.3-2+deb10u3_armhf.deb' to decompressor pipe: failed to write (Broken pipe)
Reading changelogs... Done
(Reading database ... 98611 files and directories currently installed.)
Preparing to unpack .../chromium-browser_88.0.4324.187-rpt1_armhf.deb ...
Unpacking chromium-browser (88.0.4324.187-rpt1) over (86.0.4240.197-rpt1) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/chromium-browser_88.0.4324.187-rpt1_armhf.deb (--unpack):
 cannot copy extracted data for './usr/lib/chromium-browser/chromium-browser-v7' to '/usr/lib/chromium-browser/chromium-browser-v7.dpkg-new': unexpected end of file or stream
Preparing to unpack .../libpython3.7-dev_3.7.3-2+deb10u3_armhf.deb ...
Unpacking libpython3.7-dev:armhf (3.7.3-2+deb10u3) over (3.7.3-2+deb10u2) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/libpython3.7-dev_3.7.3-2+deb10u3_armhf.deb (--unpack):
 cannot copy extracted data for './usr/lib/python3.7/config-3.7m-arm-linux-gnueabihf/libpython3.7m-pic.a' to '/usr/lib/python3.7/config-3.7m-arm-linux-gnueabihf/libpython3.7m-pic.a.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
 /var/cache/apt/archives/chromium-browser_88.0.4324.187-rpt1_armhf.deb
 /var/cache/apt/archives/libpython3.7-dev_3.7.3-2+deb10u3_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

어떻게 해결할 수 있나요?

감사해요!

답변1

다운로드한 패키지 중 일부가 손상된 것 같습니다. 실행 apt clean하여 패키지 캐시를 삭제한 다음 apt --fix-broken install다시 실행하여 새 복사본을 다운로드하세요.

관련 정보