无法更新/升级/安装软件

无法更新/升级/安装软件

感谢您花时间查看此问题,我已经浏览了与此问题相关的其他论坛,但似乎无法查明问题所在。我对 ubuntu 命令行也不太熟悉 - 因此我会尽力跟上。

基本信息:

Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty
danger@danger-Samsung-DeskTop-System:~$  uname -a
Linux danger-Samsung-DeskTop-System 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

错误:

E: Sub-process /usr/bin/dpkg returned an error code (2)

流程:

danger@danger-Samsung-DeskTop-System:~$ sudo apt-get update
Reading package lists... Done
danger@danger-Samsung-DeskTop-System:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
80 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/155 MB of archives.
After this operation, 11.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Extracting templates from packages: 100%
Preconfiguring packages ...
**E: Sub-process /usr/bin/dpkg returned an error code (2)**
danger@danger-Samsung-DeskTop-System:~$ 

我不得不删掉一大堆代码,因为我需要“至少 10 点声誉才能发布超过 2 个链接”。任何帮助都将不胜感激。
当我尝试从软件中心安装任何东西时,我也收到此错误:

Package operation failed
The installation or removal of a software package failed.
installArchives() failed: 
Extracting templates from packages: 75%
Extracting templates from packages: 100%

Extracting templates from packages: 75%
Extracting templates from packages: 100%

Extracting templates from packages: 75%
Extracting templates from packages: 100%
Error in function: 

答案1

怀疑磁盘问题:

首先检查可用磁盘空间:

df -h

使用率% 列中不应有 100% 的行

其次,检查您的任何常规文件系统是否未以只读方式挂载:

mount | egrep '^\/'

如果 () 之间是“ro”而不是“rw”,请先解决这个问题。

答案2

JDeHaan,

非常感谢你在整个过程中的耐心支持,昨晚凌晨 2 点喝了几杯鸡尾酒后,我感到很沮丧,决定重新安装。在多次尝试格式化、重新分区并在安装过程中出现写入错误后,它开始看起来像是 HD 故障问题。一次尝试终于成功了,我现在可以安装和更新软件了。

再次感谢!

相关内容