0
Reading package lists... Done
Building dependency tree
Reading state information... Done
vim is already the newest version (2:7.4.1689-3ubuntu1.3).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 python3 : Depends: dh-python but it is not installable
 python3-setuptools : Depends: python3-pkg-resources (= 20.7.0-1) but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

further tried to run apt-get -f install vim but again same error.

singrium
  • 6,880
balu
  • 1
  • 1
    The output says that you already have vim installed!
    Run sudo apt-get -f install without vim to fix the issues.
    – singrium Feb 18 '20 at 09:46
  • I would check your sources (you didn't provide release details, but it looks like xenial), and your python3 version (https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=python3-setuptools shows correct source for xenial thus check sources, https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=python3, https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=vim) – guiverc Feb 18 '20 at 09:58

2 Answers2

3

First, you have vim installed, and it is the newest version. You don't need to install it.

Second, you have some issues with Python packages. To solve them:
- Run sudo apt-get -f install then run sudo dpkg --configure -a. Finally, run sudo apt-get -f install.
- If the problem is not solved, run sudo apt-get install --reinstall python3

singrium
  • 6,880
  • Thank for your response. Yes, your right there issue with python package. when I tried to run "Sudo apt-get -f install" , its also throwing error. the error as below. /var/lib/dpkg/info/python3.prerm: 5: /var/lib/dpkg/info/python3.prerm: py3clean: not found dpkg: error processing package python3 (--remove): subprocess installed pre-removal script returned error exit status 127 Errors were encountered while processing: python3-pip python3-setuptools python3-wheel python3 E: Sub-process /usr/bin/dpkg returned an error code (1) – balu Feb 18 '20 at 10:19
-2

If not worked after sudo apt-get -f install, run the command sudo apt-get update to update.

Melebius
  • 11,431
  • 9
  • 52
  • 78