Issue
I am running Debian 9 with XFCE4 on Dell XPS 15 (9560). Recently I ran into trouble with apt. If I try to run anything using apt-get install, the following always return:
william@debian:~$ sudo apt-get 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: vim-common (= 2:7.4.488-7+deb8u3) but 2:8.0.0197-4+deb9u1 is to be installed
E: Unable to correct problems, you have held broken packages.
I have tried running sudo apt-get update
, sudo apt-get upgrade
, sudo apt --fix-broken install
, sudo apt-get clean
, and etc, etc.
Some of them return messages like this:
william@debian:~$ sudo apt-get update
Ign:1 http://ftp.us.debian.org/debian jessie InRelease
Hit:2 http://ftp.us.debian.org/debian jessie Release
Reading package lists... Done
william@debian:~$ sudo apt-get install upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package upgrade
william@debian:~$ sudo apt-get install dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dist-upgrade
Please help and thanks a lot :)
Solution
Please update your sources.list file...... Use terminal and open using permission
$ sudo gedit /etc/apt/sources.list
Paste the links here , you can find them on internet
Or paste these :
deb http://deb.debian.org/debian stretch main deb-src http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian stretch-updates main deb-src http://deb.debian.org/debian stretch-updates main
deb http://security.debian.org/debian-security/ stretch/updates main deb-src http://security.debian.org/debian-security/ stretch/updates main
Thanku for asking amd sorry if im wrong somewhere 😊
Answered By - tarun narain