패키지 시스템이 손상되었습니다. 어떻게 고치나요?

패키지 시스템이 손상되었습니다. 어떻게 고치나요?

최근에 Arduino를 구입했는데 소프트웨어를 컴파일하려면 gcc-avr/avrdude가 필요합니다. 얼마 전에 다른 마이크로프로세서 구성 요소용으로 avr을 설치했지만 분명히 오래된 버전(gcc 버전 3.3 20030512(시험판))이므로 업데이트를 진행했지만 작동하지 않았습니다.

(미리 불완전한 와인 설치로 인해 aptdaemon이 손상되었지만(글꼴 설치 계약을 통과할 수 없음) 재설치를 통해 문제를 해결한 후 계약을 수락했습니다.)

나는 이것을 실행하여 업데이트하려고합니다.빙고의 빌드 스크립트하지만 avr... 터미널 보고서로 인해 필요한 종속성을 설치할 수 없습니다.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version.
libncurses5-dev is already the newest version.
libncurses5-dev set to manually installed.
libusb-0.1-4 is already the newest version.
libx11-dev is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
arduino-core : Depends: gcc-avr but it is not going to be installed
avr-libc : Depends: gcc-avr (>= 1:4.3.4) but it is not going to be installed
Depends: binutils-avr (>= 2.20) but it is not going to be installed
binutils-dev : Depends: binutils (= 2.21.0.20110327-2ubuntu3) but 2.21.0.20110327-2ubuntu2 is to be installed
libcwidget-dev : Depends: libcwidget3 (= 0.5.16-3ubuntu2) but it is not going to be installed
Depends: libsigc++-2.0-dev but it is not going to be installed
Depends: libncursesw5-dev but it is not going to be installed
libmpfr-dev : Depends: libgmp3-dev (>= 4.2.dfsg-1) but it is not going to be installed
python-dev : Depends: python (= 2.7.1-0ubuntu5.1) but 2.7.1-0ubuntu5 is to be installed
Depends: python2.7-dev (>= 2.7.1-1~) but it is not going to be installed
tk8.4-dev : Depends: tk8.4 (= 8.4.19-4) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

하지만 달리는 중

apt-get -f install

결과

(Reading database ... 163021 files and directories currently installed.)
Unpacking binutils-avr (from .../binutils-avr_2.20.1-1ubuntu2_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/binutils-avr_2.20.1-1ubuntu2_i386.deb (--unpack):
trying to overwrite '/usr/bin/avr-size', which is also in package avr-binutils 2.13.90.030512-2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Unpacking gcc-avr (from .../gcc-avr_1%3a4.3.5-1_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/gcc-avr_1%3a4.3.5-1_i386.deb (--unpack):
trying to overwrite '/usr/bin/avr-g++', which is also in package avr-gcc-c++ 3.2.90.20030512-2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/binutils-avr_2.20.1-1ubuntu2_i386.deb
/var/cache/apt/archives/gcc-avr_1%3a4.3.5-1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

업데이트 관리자를 실행하고 이를 통해 시스템을 업데이트해 보았으나 오류 메시지만 표시됩니다.

The following packages have unmet dependencies:
arduino-core: Depends: gcc-avr but it is not installed
avr-libc: Depends: gcc-avr (>= 1:4.3.4) but it is not installed
Depends: binutils-avr (>= 2.20) but it is not installed

그런 다음 apt-get -f install을 실행해 보라고 지시합니다. 결과는 지난번과 동일합니다.

그럼 내 시스템을 어떻게 고칠 수 있나요? 정말 새 avr이 필요합니다. :) 그런데 제 시스템은 Ubuntu 11.04입니다.

답변1

해당 오류가 발생한 후 sudo apt-get -f install오류로 인해 로드되지 않은 파일을 강제로 설치해 보세요.

그런 다음 오류가 있는 패키지만 남을 때까지 앞뒤로 sudo apt-get update다시 시도하십시오.sudo apt-get -f install

sudo dpkg --configure -a

캐시를 정리하고

sudo apt-get clean

답변2

이는 일반적으로 '설치된 패키지에 대한 종속성이 충족되지 않음'의 결과로 발생합니다.

'Synaptic'이 설치된 경우 간단한 해결 방법은 다음과 같습니다.

  • 시냅틱을 엽니다.
  • '상태'(왼쪽 탐색)로 이동합니다.
  • '깨진'을 선택하세요.
  • 손상된 패키지를 제거하십시오.

그렇지 않으면 CLI를 통해 처리할 수 있습니다.

터미널을 열고 다음 명령을 실행하십시오.

sudo apt-get clean

위 명령은 검색된 패키지 파일의 로컬 저장소를 정리합니다.

sudo apt-get install -f

깨진 종속성을 수정합니다. 즉, -f여기서는 "깨진 문제 수정"을 의미합니다.

sudo dpkg --configure -a

-a아직 구성되지 않은 모든 패키지( )를 구성합니다 . 결국 업데이트 명령을 실행하십시오 sudo apt-get update.

답변3

열려 있는시냅스시냅틱 설치. 그런 다음 상태로 이동하여 선택하십시오.고장난. 그런 다음 깨진 패키지를 완전히 제거하십시오.

이렇게 하면 시스템이 수정됩니다.

여기에 이미지 설명을 입력하세요

답변4

시도해 보세요. sudo apt-get update && sudo apt-get -f install
문제가 해결되기를 바랍니다.

관련 정보