debian/ubuntu安装软件依赖包冲突怎么办?debian/ubuntu安装软件依赖冲突错误终极解决方案

2020-09-08
0评论
/
1201阅读
爱搜啊

进入正题

先说说我遇到的问题吧

使用基础解决方案不能解决的,更严重的是,想重装那些软件,却卸载不了,提示依赖冲突。

这个时候我都想重装系统了,可是我配置了这个多东西,安装了这个多软件等原因,不到最后一步我不想选择重装系统这个方法,毕竟重装系统不一定能解决冲突问题。

不过,我最终还是找到了解决方案。

debian/ubuntu安装软件时依赖冲突错误

这就分享出来,帮大家多一个选择的解决方案,当然不到万不得已请不要选择这个方法。

现在我们来看看这个依赖的冲突问题吧。

安装软件时提示的是什么错误信息呢?

安装的软件依赖的软件版本过低。

首先系统怎么知道依赖冲突呢?

应该是每个软件都写清楚了自己依赖哪些软件以及这些软件的最低版本.

那我们能不能手动修改这些依赖的软件的版本呢?

如果知道这些信息在哪里储存,那就可以修改了。

那这些信息在哪里储存呢?

貌似在/var/lib/dpkg/status这个文件里面。

比如我的vim-common的信息

Package: vim-common
Status: install ok installed
Priority: important
Section: editors
Installed-Size: 296
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: i386
Source: vim
Version: 2:7.3.547-6ubuntu3~blueyed1~precise
Depends: libc6 (>= 2.3.4)
Recommends: vim | vim-gnome | vim-gtk | vim-athena | vim-nox | vim-tiny
Conffiles:
/etc/vim/vimrc 682aa2a07693cc27756eee9751db3903
Description: Vi IMproved - Common files
Vim is an almost compatible version of the UNIX editor Vi.
.
Many new features have been added: multi level undo, syntax
highlighting, command line history, on-line help, filename
completion, block operations, folding, Unicode support, etc.
.
This package contains files shared by all non GUI-enabled vim
variants (vim and vim-tiny currently) available in Debian.
Examples of such shared files are: manpages, common executables
like xxd, and configuration files.
Homepage: http://www.vim.org/
Original-Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>

可以看到里面的两个对我们来说重要的数据

Version: 2:7.3.547-6Ubuntu3~blueyed1~precise

Depends: libc6 (>= 2.3.4)

假设我们的 libc6 的版本是 2.3.2 的话,安装 vim-common 的话机会提示依赖冲突,说需要 libc6 的版本至少是 2.3.4。

此时我们可以做修改了最低依赖版本会怎么样呢?

比如

Version: 2:7.3.547-6ubuntu3~blueyed1~precise

Depends: libc6 (>= 2.3.2)

这是再次修复竟然成功了,也可以卸载了。

好吧,解决方案就是这个:把依赖的软件的版本修改为目前安装的版本即可。


本站附件分享,如果附件失效,可以去找找看

诚通网盘附件百度网盘附件


标签: Debian Ubuntu
于2020-09-08发布