将 Ubuntu 16.04 升级到 18.04 后 vim 不起作用...无法安装它!

将 Ubuntu 16.04 升级到 18.04 后 vim 不起作用...无法安装它!

升级 Ubuntu 后,我注意到 vim 不起作用(实际上是从 Ubuntu 中删除)

因此我尝试使用此命令重新安装它:

$ sudo apt install vim

结果是:

Reading package lists... Done
Building dependency tree
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: libpython3.6 (>= 3.6.4~rc1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我怎样才能找回 Vim?!

根据 N0rbert 评论进行编辑:

vim:
  Installed: (none)
  Candidate: 2:8.0.1453-1ubuntu1
  Version table:
     2:8.0.1453-1ubuntu1 500
        500 http://ir.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
libpython3.6:
  Installed: (none)
  Candidate: 3.6.7-1~18.04
  Version table:
     3.6.7-1~18.04 500
        500 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
     3.6.6-3~18.04.york0 500
        500 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu bionic/main amd64 Packages
     3.6.5-3 500
        500 http://ir.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

答案1

尝试添加这个 ppa -https://launchpad.net/~jonathonf/+archive/ubuntu/python-3.6

然后安装它-

sudo apt update
sudo apt install -f
sudo apt install vim

相关内容