升级依赖性损坏(软件包损坏)

升级依赖性损坏(软件包损坏)

当我尝试运行以下命令时:-

sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler

我遇到的错误是:-

Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Fetched 306 kB in 1s (173 kB/s)   
Reading package lists... Done
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:
 python-sphinx : Depends: sphinx-common (= 1.3.6-2ubuntu1) but 1.3.6-2ubuntu1.1 is installed
                 Recommends: sphinx-doc but it is not installed
E: Unmet dependencies. Try using -f

然后我尝试:-

sudo apt-get -f install

再次出现错误:-

Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  python-sphinx
Suggested packages:
  dvipng texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
Recommended packages:
  sphinx-doc
The following packages will be upgraded:
  python-sphinx
1 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
102 not fully installed or removed.
Need to get 0 B/401 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: warning: files list file for package 'apport-gtk' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'apport-symptoms' missing; assuming package has no files currently installed
(Reading database ... 231891 files and directories currently installed.)
Preparing to unpack .../python-sphinx_1.3.6-2ubuntu1.1_all.deb ...
/var/lib/dpkg/info/python-sphinx.prerm: 6: /var/lib/dpkg/info/python-sphinx.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-sphinx_1.3.6-2ubuntu1.1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python-sphinx.postinst: 6: /var/lib/dpkg/info/python-sphinx.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/python-sphinx_1.3.6-2ubuntu1.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

建议如何摆脱此错误。

相关内容