如何在新的debian12版本上安装vim?

如何在新的debian12版本上安装vim?

我的 debian12 上安装 vim 时版本冲突:

sudo apt install vim
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:    
The following packages have unmet dependencies:
 vim : Depends: vim-common (= 2:8.1.0875-5+deb10u5) but 2:9.0.1378-2 is to be installed
E: Unable to correct problems, you have held broken packages.

所以我删除vim-common

sudo apt-get purge vim-common  

重新安装:

sudo apt-get install vim       
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ncurses-base : Breaks: vim-common (< 2:9.0.1000-2) but 2:8.1.0875-5+deb10u5 is to be installed
 ncurses-term : Breaks: vim-common (< 2:9.0.1000-2) but 2:8.1.0875-5+deb10u5 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

那么debian12下如何安装vim呢?

uname -a
Linux MiWiFi-R4A-srv 6.1.0-9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) x86_64 GNU/Linux

相关内容