Ubuntu安装程序出现“Sub-process usrbindpkg returned an error code (1)”的问题

Ubuntu安装程序出现“Sub-process /usr/bin/dpkg returned an error code (1)"的问题

解决方法**:

sudo可要可不要,自行选择。

1.$ sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old //现将info文件夹更名

2.$ sudo mkdir /var/lib/dpkg/info //再新建一个新的info文件夹
3.$ sudo apt-get update && apt-get -f install //不用解释了吧
4.$ sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old //执行完上一步操作后会在新的info文件夹下生成一些文件,现将这些文件全部移到info_old文件夹下
5.$ sudo rm -rf /var/lib/dpkg/info //把自己新建的info文件夹删掉
6.$ sudo mv /var/lib/dpkg/info_old /var/lib/dpkg/info //把以前的info文件夹重新改

root@xuxin-virtual-machine:/home/xuxin# sudo apt-get install lsb-core正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
lsb-core 已经是最新版 (9.20160110ubuntu0.2)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 394 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
您希望继续执行吗? [Y/n] y
正在设置 lsb-core (9.20160110ubuntu0.2) ...
  File "/usr/bin/py3compile", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3compile on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
dpkg: 处理软件包 lsb-core (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 1
在处理时有错误发生:
 lsb-core
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@xuxin-virtual-machine:/home/xuxin# sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old

root@xuxin-virtual-machine:/home/xuxin# sudo mkdir /var/lib/dpkg/info

root@xuxin-virtual-machine:/home/xuxin# sudo apt-get update && apt-get -f install
命中:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial InRelease
命中:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-updates InRelease
命中:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-backports InRelease
命中:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-security InRelease
正在读取软件包列表... 完成  
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 394 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
正在设置 lsb-core (9.20160110ubuntu0.2) ...

root@xuxin-virtual-machine:/home/xuxin# sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old

root@xuxin-virtual-machine:/home/xuxin# sudo rm -rf /var/lib/dpkg/info

root@xuxin-virtual-machine:/home/xuxin# sudo mv /var/lib/dpkg/info_old /var/lib/dpkg/info

root@xuxin-virtual-machine:/home/xuxin# sudo apt-get install lsb-core正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
lsb-core 已经是最新版 (9.20160110ubuntu0.2)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 394 个软件包未被升级。
root@xuxin-virtual-machine:/home/xuxin# 
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值