纠正依赖性

纠正依赖性

在安装游戏的过程中,包管理器需要一些包,输入这些包后,并没有安装它们,而是需要如下:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 grub-pc : Depends: grub-common (= 2.02~beta2-36ubuntu3.14)
 grub-pc-bin : Depends: grub-common (= 2.02~beta2-36ubuntu3.14)
 grub2-common : Depends: grub-common (= 2.02~beta2-36ubuntu3.14)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

输入所需命令后,并没有解决问题。 :(

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  grub-common
Suggested packages:
  multiboot-doc grub-emu xorriso desktop-base
The following packages will be upgraded:
  grub-common
1 upgraded, 0 newly installed, 0 to remove and 244 not upgraded.
3 not fully installed or removed.
Need to get 0 B/1.705 kB of archives.
After this operation, 8.192 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
dpkg: warning: files list file for package 'libdbusmenu-gtk3-4:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libdbusmenu-glib4:amd64'     missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpython2.7-dev:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libappindicator3-1' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python2.7-dev' missing; assuming     package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libpython2.7-minimal:amd64' is missing final     newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

这是一个反复出现的问题吗?

答案1

首先,我想建议使用aptitude(而不是apt-get),不知何故我发现它更好地解决依赖问题

实际上发生在你身上的事情看起来像是一些包问题: dpkg: unrecoverable fatal error, aborting: files list file for package 'libpython2.7-minimal:amd64' is missing final newline

这很可能会导致您头痛。

快速谷歌搜索发现: https://www.linuxquestions.org/questions/debian-26/apt-get-dpkg-error-files-list-file-missing-final-newline-271118/

因此,让我们尝试从您的系统中删除这个 pkg(它应该位于下面的某个位置/var/cache/apt/,然后再次安装它。

我认为该软件包(以某种方式)已经在您的系统上损坏了。

相关内容