2

Sorry buy it's in spanish:

~# apt install vim
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias       
Leyendo la información de estado... Hecho
El paquete vim no está disponible, pero algún otro paquete hace referencia
a él. Esto puede significar que el paquete falta, está obsoleto o sólo se
encuentra disponible desde alguna otra fuente

E: El paquete «vim» no tiene un candidato para la instalación

Basically

The «vim» package does not have a candidate for installation

I've got Debian 9 installed and updated.

what source I have to add in /etc/apt/sources.list to get Vim installed?

@stephen-kitt this is my apt Policy (thanks!)

~# LC_ALL=C apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://deb.debian.org/debian stretch-updates/main amd64 Packages
     release o=Debian,a=stable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://security.debian.org/debian-security stretch/updates/contrib amd64 Packages
     release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=contrib,b=amd64
     origin security.debian.org
 500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
     release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
Pinned packages:
0

1 Answer 1

5

Your apt policy output indicates you have 3 repositories configured:

  • updates for the main repository
  • security updates for the contrib repository
  • security updates for the main repository

But you're missing the actual main repository itself (and also the contrib repository).

Add this line to your /etc/apt/sources.list file:

deb http://deb.debian.org/debian stretch main contrib

These lines specify access to the full main and contrib repositories to stretch, not just to updates published after the release.

Then run apt update to update the repository contents lists, and finally try apt install vim again.

2
  • thanks! but edit the deb http://deb.debian.org/debian stretch/main amd64 to this deb http://deb.debian.org/debian stretch main amd64 and will work! thank you very much
    – maniat1k
    Commented Mar 8, 2019 at 13:57
  • Duh! That proves the sysadmin's golden rule: making configuration changes on Friday at around 4pm is never a good idea.
    – telcoM
    Commented Mar 8, 2019 at 14:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .