깨진 패키지를 수리하는 방법은 무엇입니까?

깨진 패키지를 수리하는 방법은 무엇입니까?

내 libboost 패키지가 손상되었습니다. 나는 그것을 고치는 방법을 모른다. 나는 시도했다:

sudo apt-get autoremove

그리고 그 결과는 다음과 같았습니다.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libboost-chrono1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-date-time1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-exception1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-filesystem1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-graph-parallel1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-graph1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-iostreams1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-locale1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-log1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-math1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-mpi1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-program-options1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-python1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-random1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-regex1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-serialization1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-signals1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-system1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-test1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-thread1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-timer1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-wave1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost1.54-all-dev : Depends: libboost1.54-dev but it is not installed
E: Unmet dependencies. Try using -f.

그런 다음 다음을 시도했습니다.

sudo apt-get install -f libboost1.54-dev

그리고 그 결과는 다음과 같았습니다.

Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libboost-atomic1.53.0 libboost-context1.53.0 libboost-graph1.53.0 libboost-locale1.53.0 libboost-math1.53.0 libboost-python1.53.0
  libboost-random1.53.0 libboost-signals1.53.0 libboost-test1.53.0 libboost-timer1.53.0 libboost-wave1.53.0 libboost1.53-tools-dev
Use 'apt-get autoremove' to remove them.
Suggested packages:
  libboost1.54-doc libboost-coroutine.54-dev libboost-log.54-dev xsltproc doxygen default-jdk fop
The following NEW packages will be installed:
  libboost1.54-dev
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
24 not fully installed or removed.
Need to get 0 B/10.3 MB of archives.
After this operation, 101 MB of additional disk space will be used.
(Reading database ... 320270 files and directories currently installed.)
Unpacking libboost1.54-dev (from .../libboost1.54-dev_1.54.0-2ubuntu3_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libboost1.54-dev_1.54.0-2ubuntu3_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/quickbook', which is also in package libboost1.53-tools-dev 1.53.0-6+exp3ubuntu8
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libboost1.54-dev_1.54.0-2ubuntu3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

그리고 이것은 sudo apt-get check의 결과입니다:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libboost-chrono1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-date-time1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-exception1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-filesystem1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-graph-parallel1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-graph1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-iostreams1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-locale1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-log1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-math1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-mpi1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-program-options1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-python1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-random1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-regex1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-serialization1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-signals1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-system1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-test1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-thread1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-timer1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost-wave1.54-dev : Depends: libboost1.54-dev (= 1.54.0-2ubuntu3) but it is not installed
 libboost1.54-all-dev : Depends: libboost1.54-dev but it is not installed
E: Unmet dependencies. Try using -f.

그리고 그 결과

apt-cache policy libboost1.54-all-dev libboost-wave1.54-dev libboost-python1.54-dev

이다:

libboost1.54-all-dev:
  Installed: 1.54.0-2ubuntu3
  Candidate: 1.54.0-2ubuntu3
  Version table:
 *** 1.54.0-2ubuntu3 0
        500 http://ir.archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
        100 /var/lib/dpkg/status
libboost-wave1.54-dev:
  Installed: 1.54.0-2ubuntu3
  Candidate: 1.54.0-2ubuntu3
  Version table:
 *** 1.54.0-2ubuntu3 0
        500 http://ir.archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
        100 /var/lib/dpkg/status
libboost-python1.54-dev:
  Installed: 1.54.0-2ubuntu3
  Candidate: 1.54.0-2ubuntu3
  Version table:
 *** 1.54.0-2ubuntu3 0
        500 http://ir.archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
        100 /var/lib/dpkg/status

libboost 패키지를 복구하려면 어떻게 해야 합니까?

답변1

방금 같은 문제가 발생했는데 libboost1.54-dev가 libboost1.53-dev를 덮어쓰지 않았습니다. 내 목표는 libboost1.54-all-dev를 설치하는 것이었지만 다른 모든 패키지는 libboost1.54-dev에 의존하므로 설치되지 않았습니다.

그래서 packages.ubuntu.com에 가서 libboost1.54-dev를 검색해 saucy(링크) 파일을 다운로드했습니다.

deb 파일이 내 컴퓨터에 있으면 다음 줄로 덮어쓰면서 파일을 설치해야 했습니다.

sudo dpkg -i --force-overwrite libboost1.54-dev_1.54.0-2ubuntu3_amd64.deb

그 후에는 그냥 하는 거야

sudo apt-get update && sudo apt-get install -f && sudo apt-get autoremove

문제를 해결했습니다.

도움이 되었기를 바랍니다.

답변2

제거한 libboost1.53-tools-dev후 다시 시도하세요.

sudo apt-get purge -f libboost1.53-tools-dev
sudo apt-get install -f

여기에 오류가 나타나지 않으면 계속하세요.

sudo apt-get autoremove

그렇지 않으면질문을 수정하세요의 결과를 추가합니다 sudo apt-get check.

관련 정보