I am unable to install any package using command "apt-get install".
Whenever I execute above command to install any package, it shows me a common error saying E: Package <PackageName> has no installation candidate
I tried following packages to install but every time I faced the same error
Command
sudo apt-get install apache2
Error
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package apache2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libapache2-mpm-itk
E: Package 'apache2' has no installation candidate
Commmand
sudo apt-get install postfix nap ntpdate
Error
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ntpdate is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package postfix is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'postfix' has no installation candidate
E: Package 'ntpdate' has no installation candidate
Also I tried to update and upgrade using following command
sudo apt-get update && sudo apt-get upgrade
But after that also; executing apt-get install
command also shows the same error.
Please find my /etc/apt/sources.list file content as below, let me know if I made something wrong in configuration.
Please help me.
{Editor inserted copy of linked-to file:}
## deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
# Source repository to add
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
#deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
#deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
# Source repository to add
#deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
r$
s at the end of various lines in the pastebin actually insources.list
or just because you cut n' pasted it from some editor? It is simpler if you just usecat /etc/apt/sources.list
. It is also simpler if you just paste the output into the question rather than use a pastebin link.