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

来源:互联网 发布:怎么看淘宝金牌卖家 编辑:程序博客网 时间:2024/06/12 22:53

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 1Errors were encountered while processing: tex-commonE: Sub-process /usr/bin/dpkg returned an error code (1)
复制代码

 

2. 解决方案

1) 方案一

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

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

2) 方案二

cd /var/lib/dpkg/infosudo mkdir tex-commonsudo mv tex-common.* tex-common

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

3) 方案三

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

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

0 0
原创粉丝点击