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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值