由于 dpkg 被中断,无法在 linux 中安装软件错误 [英] can not install software in linux error as dpkg was interrupted

查看:41
本文介绍了由于 dpkg 被中断,无法在 linux 中安装软件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用以下命令安装单声道,

I was trying to install mono using following commands,

  1. sudo apt-get install mono-*

不幸的是,我在安装时关闭了终端.我再次开始重新安装,但显示如下错误

unfortunately, I closed the terminal while it installing. again i started to reinstall but shown error like

无法获得锁/var/lib/dpkg/lock - open (11: 资源暂时不可用)

Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)

我尝试了以下命令来解决,

I tried below commands for solution,

  1. sudo rm/var/lib/apt/lists/lock
  2. sudo rm/var/cache/apt/archives/lock

但现在我收到类似的错误

But now I am getting the error like

dpkg 被中断,你必须手动运行 'sudo dpkg --configure -a'解决问题.

dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

我该如何解决这个问题?

how do I fix this one?

推荐答案

当您在安装过程中停止任何安装时会出现此错误.不管是终端还是Ubuntu应用中心,都会报错.​​

This error occurs when you stop any installation while it's in progress. Regardless of whether you are using the terminal or the Ubuntu app center, the error will still be generated.

您可以通过删除损坏的安装来解决此问题.为此,请按照编写顺序在终端中输入以下命令.

You can solve this by removing the broken installation. To do so, enter the following commands in the terminal in the order they are written.

   cd /var/lib/dpkg/updates
   sudo rm *
   sudo apt-get update

这篇关于由于 dpkg 被中断,无法在 linux 中安装软件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆