E: Sub-process /usr/bin/dpkg returned an error code (1) 解决方案

原文地址为: E: Sub-process /usr/bin/dpkg returned an error code (1) 解决方案

E: Sub-process /usr/bin/dpkg returned an error code (1) 解决方案

软件版本:
  操作系统:ubuntu10.04
  内核版本:Linux version 2.6.32-41-generic

目录:
  1. 错误
  2. 解决方法
    1) 方案一
    2) 方案二
    3) 方案三
  3. 参考资料

1. 错误

  在使用 apt-get 安装工具时,无论安装什么软件都会遇到这样子的错误:

dpkg: warning: files list file for package `tex-common' missing, assuming package has no files currently installed.
(Reading database ... 150177 files and directories currently installed.)
Preparing to replace tex-common 2.06ubuntu0.1 (using .../tex-common_2.06ubuntu0.1_all.deb) ...
Unpacking replacement tex-common ...
Processing triggers for doc-base ...
Processing 2 changed doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for man-db ...
Setting up tex-common (2.06ubuntu0.1) ...
Running mktexlsr. This may take some time... done.
No packages found matching texlive-base.
dpkg: error processing tex-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 tex-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

2. 解决方案

1) 方案一

cd /var/lib/dpkg
sudo mv info info.bak
sudo mkdir info
重新安装,在此为:
sudo apt-get --reinstall tex-common

  这个方案来源于[1]。这种方法可能会造成安装软件时出现一大片 warning 。

2) 方案二

cd /var/lib/dpkg/info
sudo mkdir tex-common
sudo mv tex-common.* tex-common

  这个方法是根据方案一想出来的,也可以解决这个错误。暂时不知道会不会造成其他错误。

3) 方案三

sudo apt-get purge tex-common
sudo apt-get install tex-common

  这个方案其实就是将 tex-common 清除后,重装。来源于[2]

3. 参考资料

[1]. http://forum.ubuntu.org.cn/viewtopic.php?f=86&t=90547 
[2]. http://askubuntu.com/questions/25693/dpkg-behaving-strangely


转载请注明本文地址: E: Sub-process /usr/bin/dpkg returned an error code (1) 解决方案

猜你喜欢

转载自blog.csdn.net/linjcai/article/details/81457717
今日推荐