如何修复破损的包裹?

如何修复破损的包裹?

我的 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

相关内容