无法在 Ubuntu 中安装任何软件包

无法在 Ubuntu 中安装任何软件包

我无法使用 apt 将任何软件包安装到我的系统中。我的系统昨天还很完美

请看一下:

$ sudo apt-get install indicator-stickynotes
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libxrandr-ltsq2 libportaudio0 chromium-inspector lesstif2 xaw3dg
  libreadline5 libllvm3.1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  python3 python3-gi python3-minimal python3.2 python3.2-minimal
Suggested packages:
  python3-doc python3-tk python3.2-doc
The following NEW packages will be installed:
  indicator-stickynotes python3 python3-gi python3-minimal python3.2
  python3.2-minimal
0 upgraded, 6 newly installed, 0 to remove and 455 not upgraded.
Need to get 0 B/4,522 kB of archives.
After this operation, 15.6 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: unrecoverable fatal error, aborting:
 syntax error: unknown user 'spread' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)

任何帮助都值得感激。提前致谢

答案1

每次dpkg运行时,它都会检查文件中的所有用户条目/var/lib/dpkg/statoverride是否在中/etc/passwd,如果未找到所有条目,则会发出警告。

因此,看起来您的系统不再有该用户spread- 要么您(或其他管理员)已删除该用户,要么该用户已在删除某些程序时被删除。

您可以通过以下方式解决问题

  1. 重新创建丢失的用户spread(或重新安装创建该用户的程序)
  2. 删除有问题的行/var/lib/dpkg/statoverride

相关内容