After upgrading Ubuntu, I just notice that vim is not working (actually deleting from Ubuntu)

So I tried to re-installing it using this command:

$ sudo apt install vim

And the result is:

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.

How can I have Vim back?!

edited after N0rbert comment:

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

Try adding this ppa - https://launchpad.net/~jonathonf/+archive/ubuntu/python-3.6

Then install it -

sudo apt update
sudo apt install -f
sudo apt install vim
New contributor
Kavish Baghel is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • again this message: 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. – Mohammad Sharifi Dec 6 at 20:41
  • Maybe I'm out of my depth, but I don't see why this would be necessary. libpython3.6 is in the default repos. See OP's edit for details. – wjandrea Dec 6 at 20:55
  • You can try using the command - sudo apt update --fix-missing – Kavish Baghel 2 days ago

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.