在ubuntu下使用apt-get install 安装资源的时候,总是会遇到Sub-process /usr/bin/dpkg returned an error code (1) 错了,

跟安装软件依赖没有清理干净,因此下次更新的时候还会报错,虽然网上有n多这样的处理方式,

经过查看和处理以后记录下来一种有效方案留作自己查看:

办法如下:
  sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bak
  sudo mkdir /var/lib/dpkg/info //再新建一个新的info文件夹

apt-get -f install 
  sudo apt-get update

sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info.bak
sudo rm -rf /var/lib/dpkg/info
sudo mv /var/lib/dpkg/info.bak /var/lib/dpkg/info

Sub-process /usr/bin/dpkg returned an error code (1)解决方法的更多相关文章

  1. E: Sub-process /usr/bin/dpkg returned an error code (1)解决办法

    解决方法: 先将info文件夹更名 sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bk 新建一个新的info文件夹 sudo mkdir /var/lib ...

  2. Linux 解决E: Sub-process /usr/bin/dpkg returned an error code (1)错误

    在用apt-get安装软件时出现了类似于 install-info: No dir file specified; try --help for more information.dpkg: 处理 g ...

  3. Ubuntu:E: Sub-process /usr/bin/dpkg returned an error code (1)

    Ubuntu系统安装软件时报以下错误: E: Sub-process /usr/bin/dpkg returned an error code (1) 解决: mv /var/lib/dpkg/inf ...

  4. [转]ubuntu错误解决E: Sub-process /usr/bin/dpkg returned an error code (1)

    [转]ubuntu错误解决E: Sub-process /usr/bin/dpkg returned an error code (1) http://yanue.net/post-123.html ...

  5. E: Sub-process /usr/bin/dpkg returned an error code (1)

    E: Sub-process /usr/bin/dpkg returned an error code (1) 错误描述 dpkg: error processing archive /var/cac ...

  6. E: Sub-process /usr/bin/dpkg returned an error code (1)错误解决

    在用apt-get安装软件时出现了类似于install-info: No dir file specified; try --help for more information.dpkg:处理 get ...

  7. E: Sub-process /usr/bin/dpkg returned an error code

    E: Sub-process /usr/bin/dpkg returned an error code (1)错误解决 在用apt-get安装软件时出现了类似于install-info: No dir ...

  8. ubuntu/debian安装mysql遇到的问题及解决方法_1.dpkg中mysql-server-5.5 (configure)时出错 mysql-server-5.5 E: Sub-process /usr/bin/dpkg returned an error code (1)

    我的debian7之前安装了mysql-server,是通过apt安装的,后来我卸载掉, 然后用whereis mysql查找, 把所有关于mysql的目录删除掉,包括带mysqld的目录及文件. 重 ...

  9. ubuntu 下出现E: Sub-process /usr/bin/dpkg returned an error code

    在用apt-get安装软件时出现了类似于 install-info: No dir file specified; try –help for more information.dpkg:处理 get ...

随机推荐

  1. OC最基础的系统转场动画

    SystemAnimationViewController *system = [SystemAnimationViewController new]; CATransition *animation ...

  2. [py]python中__new__作用

    元类metaclass 使劲搞,但是没搞清楚__new__的作用 了解Python元类 Python进阶:一步步理解Python中的元类metaclass Python中的__new__和__init ...

  3. CentOS 7 SSH 免密登录的方法

    先决条件 3 台 CentOS 7 HOSTNAME IP ROLE server1 10.8.26.197 Master server2 10.8.26.196 Slave1 server3 10. ...

  4. java之进程和线程

    1.进程和线程的通俗例子. 2.进程和线程关系.

  5. 查准率与查全率(precision and recall) 的个人理解

    假设要识别照片中的狗的,在一些照片中,包含12只狗的照片和一些猫的照片.算法识别出有8只狗.在确定的8只狗中,5只实际上是狗(真阳性TP),而其余的是猫(假阳性FP).该程序的精度为5/8,而其召回率 ...

  6. 20155203 2016-2017-4 《Java程序设计》第8周学习总结

    20155203 2016-2017-4 <Java程序设计>第8周学习总结 教材学习内容总结 1.channel的继承架构 2.position()类似于堆栈操作中的栈顶指针. 3.Pa ...

  7. CentOS7 忘了root密码怎么办

    今天打开很久没开机的另2台虚拟机,发现不记得root密码了. 于是参考了google搜索到的第一个答案,https://www.unixmen.com/reset-root-password-cent ...

  8. 正在尝试解析依赖项“MvvmLightLibs (≥ 5.2.0.0)”。 “MvvmLightLibs”已拥有为“CommonServiceLocator”定义的依赖项

    正在尝试解析依赖项"MvvmLightLibs (≥ 5.2.0.0)". "MvvmLightLibs"已拥有为"CommonServiceLoca ...

  9. Asynchronous Programming Model (APM)异步编程模型

    https://msdn.microsoft.com/zh-cn/library/ms228963(v=vs.110).aspx 一.概念 An asynchronous operation that ...

  10. UVa 557 汉堡

    https://vjudge.net/problem/UVA-557 题意: 有n个牛肉堡和n个鸡肉堡给2n个孩子吃.每个孩子在吃之前都要抛硬币,正面吃牛肉堡,反面吃鸡肉堡.如果剩下的所有汉堡都一样, ...