E: Package 'apache2' has no installation candidate

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












When I tried to install apache2 on Ubuntu 14.04, I got the following error message:



root@Final-Gitsetup-Developers:~# apt-get install apache2
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 libapache2-mpm-itk:i386

E: Package 'apache2' has no installation candidate


Results of apt-cache policy | grep http | awk 'print $2 $3' | sort -u



http://archive.ubuntu.com/ubuntu/trusty/universe 
http://repo.mysql.com/apt/ubuntu/wily/mysql-5.6
http://repo.mysql.com/apt/ubuntu/wily/mysql-apt-config
http://repo.mysql.com/apt/ubuntu/wily/mysql-tools









share|improve this question























  • Check 'Software & Updates' to ensure that in the 'Ubuntu Software' tab, that the 'main' and 'universe' sections are checked, and that in the 'Updates' tab that security and recommended updates are checked. Then run sudo apt-get update and re-try installing Apache2
    – Charles Green
    Jan 29 at 20:50










  • @CharlesGreen thanks for reply, i have issue in ubuntu server , not in computer....
    – spylh9999ggr
    Jan 30 at 5:21














up vote
1
down vote

favorite












When I tried to install apache2 on Ubuntu 14.04, I got the following error message:



root@Final-Gitsetup-Developers:~# apt-get install apache2
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 libapache2-mpm-itk:i386

E: Package 'apache2' has no installation candidate


Results of apt-cache policy | grep http | awk 'print $2 $3' | sort -u



http://archive.ubuntu.com/ubuntu/trusty/universe 
http://repo.mysql.com/apt/ubuntu/wily/mysql-5.6
http://repo.mysql.com/apt/ubuntu/wily/mysql-apt-config
http://repo.mysql.com/apt/ubuntu/wily/mysql-tools









share|improve this question























  • Check 'Software & Updates' to ensure that in the 'Ubuntu Software' tab, that the 'main' and 'universe' sections are checked, and that in the 'Updates' tab that security and recommended updates are checked. Then run sudo apt-get update and re-try installing Apache2
    – Charles Green
    Jan 29 at 20:50










  • @CharlesGreen thanks for reply, i have issue in ubuntu server , not in computer....
    – spylh9999ggr
    Jan 30 at 5:21












up vote
1
down vote

favorite









up vote
1
down vote

favorite











When I tried to install apache2 on Ubuntu 14.04, I got the following error message:



root@Final-Gitsetup-Developers:~# apt-get install apache2
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 libapache2-mpm-itk:i386

E: Package 'apache2' has no installation candidate


Results of apt-cache policy | grep http | awk 'print $2 $3' | sort -u



http://archive.ubuntu.com/ubuntu/trusty/universe 
http://repo.mysql.com/apt/ubuntu/wily/mysql-5.6
http://repo.mysql.com/apt/ubuntu/wily/mysql-apt-config
http://repo.mysql.com/apt/ubuntu/wily/mysql-tools









share|improve this question















When I tried to install apache2 on Ubuntu 14.04, I got the following error message:



root@Final-Gitsetup-Developers:~# apt-get install apache2
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 libapache2-mpm-itk:i386

E: Package 'apache2' has no installation candidate


Results of apt-cache policy | grep http | awk 'print $2 $3' | sort -u



http://archive.ubuntu.com/ubuntu/trusty/universe 
http://repo.mysql.com/apt/ubuntu/wily/mysql-5.6
http://repo.mysql.com/apt/ubuntu/wily/mysql-apt-config
http://repo.mysql.com/apt/ubuntu/wily/mysql-tools






14.04 package-management apache2 software-sources






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 30 at 7:18









karel

51.9k11110133




51.9k11110133










asked Jan 29 at 13:01









spylh9999ggr

128216




128216











  • Check 'Software & Updates' to ensure that in the 'Ubuntu Software' tab, that the 'main' and 'universe' sections are checked, and that in the 'Updates' tab that security and recommended updates are checked. Then run sudo apt-get update and re-try installing Apache2
    – Charles Green
    Jan 29 at 20:50










  • @CharlesGreen thanks for reply, i have issue in ubuntu server , not in computer....
    – spylh9999ggr
    Jan 30 at 5:21
















  • Check 'Software & Updates' to ensure that in the 'Ubuntu Software' tab, that the 'main' and 'universe' sections are checked, and that in the 'Updates' tab that security and recommended updates are checked. Then run sudo apt-get update and re-try installing Apache2
    – Charles Green
    Jan 29 at 20:50










  • @CharlesGreen thanks for reply, i have issue in ubuntu server , not in computer....
    – spylh9999ggr
    Jan 30 at 5:21















Check 'Software & Updates' to ensure that in the 'Ubuntu Software' tab, that the 'main' and 'universe' sections are checked, and that in the 'Updates' tab that security and recommended updates are checked. Then run sudo apt-get update and re-try installing Apache2
– Charles Green
Jan 29 at 20:50




Check 'Software & Updates' to ensure that in the 'Ubuntu Software' tab, that the 'main' and 'universe' sections are checked, and that in the 'Updates' tab that security and recommended updates are checked. Then run sudo apt-get update and re-try installing Apache2
– Charles Green
Jan 29 at 20:50












@CharlesGreen thanks for reply, i have issue in ubuntu server , not in computer....
– spylh9999ggr
Jan 30 at 5:21




@CharlesGreen thanks for reply, i have issue in ubuntu server , not in computer....
– spylh9999ggr
Jan 30 at 5:21










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










All the software sources in your /etc/apt/sources.list file that have the string wily (Ubuntu 15.10) in them are conflicting with your Ubuntu 14.04 software sources and preventing you from installing apache2. To fix this, preface each line that has the strings wily or xenial in it by a # character in order to turn it into a comment.



Edit the /etc/apt/sources.list file with nano text editor. Open the terminal and type:



sudo nano /etc/apt/sources.list 


A standard sources.list file for Ubuntu 14.04 looks like this:



deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu trusty partner
deb http://extras.ubuntu.com/ubuntu trusty main


Every line in the above standard sources.list file has the string trusty in it because you are using Ubuntu 14.04. Adding repositories of other Ubuntu releases such as 15.10 or 16.04 to your Ubuntu 14.04 software sources is very bad package management.



Nano editor keyboard shortcuts
Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location.
Use the keyboard combination Ctrl + X to exit nano.



Update the list of available software and install apache2.



sudo apt update 
sudo apt install apache2





share|improve this answer






















  • thanks for answer , but still same result as here : prntscr.com/i75fsi
    – spylh9999ggr
    Jan 29 at 13:09










  • thanks for update, i tried sudo add-apt-repository --remove ppa to remove all PPAs & tried sudo apt-get update & sudo apt-get install apache2 but still same result.....
    – spylh9999ggr
    Jan 29 at 13:26











  • sorry for that, okay i deleted sources.list.d folder from /etc/apt , then did sudo apt-get update & sudo apt-get install apache2, still i am getting same error.....
    – spylh9999ggr
    Jan 29 at 13:36







  • 1




    please check : prntscr.com/i761hq
    – spylh9999ggr
    Jan 29 at 13:45










  • i done as your update, prntscr.com/i76e4d still getting same error .....
    – spylh9999ggr
    Jan 29 at 14:07










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1000996%2fe-package-apache2-has-no-installation-candidate%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










All the software sources in your /etc/apt/sources.list file that have the string wily (Ubuntu 15.10) in them are conflicting with your Ubuntu 14.04 software sources and preventing you from installing apache2. To fix this, preface each line that has the strings wily or xenial in it by a # character in order to turn it into a comment.



Edit the /etc/apt/sources.list file with nano text editor. Open the terminal and type:



sudo nano /etc/apt/sources.list 


A standard sources.list file for Ubuntu 14.04 looks like this:



deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu trusty partner
deb http://extras.ubuntu.com/ubuntu trusty main


Every line in the above standard sources.list file has the string trusty in it because you are using Ubuntu 14.04. Adding repositories of other Ubuntu releases such as 15.10 or 16.04 to your Ubuntu 14.04 software sources is very bad package management.



Nano editor keyboard shortcuts
Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location.
Use the keyboard combination Ctrl + X to exit nano.



Update the list of available software and install apache2.



sudo apt update 
sudo apt install apache2





share|improve this answer






















  • thanks for answer , but still same result as here : prntscr.com/i75fsi
    – spylh9999ggr
    Jan 29 at 13:09










  • thanks for update, i tried sudo add-apt-repository --remove ppa to remove all PPAs & tried sudo apt-get update & sudo apt-get install apache2 but still same result.....
    – spylh9999ggr
    Jan 29 at 13:26











  • sorry for that, okay i deleted sources.list.d folder from /etc/apt , then did sudo apt-get update & sudo apt-get install apache2, still i am getting same error.....
    – spylh9999ggr
    Jan 29 at 13:36







  • 1




    please check : prntscr.com/i761hq
    – spylh9999ggr
    Jan 29 at 13:45










  • i done as your update, prntscr.com/i76e4d still getting same error .....
    – spylh9999ggr
    Jan 29 at 14:07














up vote
3
down vote



accepted










All the software sources in your /etc/apt/sources.list file that have the string wily (Ubuntu 15.10) in them are conflicting with your Ubuntu 14.04 software sources and preventing you from installing apache2. To fix this, preface each line that has the strings wily or xenial in it by a # character in order to turn it into a comment.



Edit the /etc/apt/sources.list file with nano text editor. Open the terminal and type:



sudo nano /etc/apt/sources.list 


A standard sources.list file for Ubuntu 14.04 looks like this:



deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu trusty partner
deb http://extras.ubuntu.com/ubuntu trusty main


Every line in the above standard sources.list file has the string trusty in it because you are using Ubuntu 14.04. Adding repositories of other Ubuntu releases such as 15.10 or 16.04 to your Ubuntu 14.04 software sources is very bad package management.



Nano editor keyboard shortcuts
Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location.
Use the keyboard combination Ctrl + X to exit nano.



Update the list of available software and install apache2.



sudo apt update 
sudo apt install apache2





share|improve this answer






















  • thanks for answer , but still same result as here : prntscr.com/i75fsi
    – spylh9999ggr
    Jan 29 at 13:09










  • thanks for update, i tried sudo add-apt-repository --remove ppa to remove all PPAs & tried sudo apt-get update & sudo apt-get install apache2 but still same result.....
    – spylh9999ggr
    Jan 29 at 13:26











  • sorry for that, okay i deleted sources.list.d folder from /etc/apt , then did sudo apt-get update & sudo apt-get install apache2, still i am getting same error.....
    – spylh9999ggr
    Jan 29 at 13:36







  • 1




    please check : prntscr.com/i761hq
    – spylh9999ggr
    Jan 29 at 13:45










  • i done as your update, prntscr.com/i76e4d still getting same error .....
    – spylh9999ggr
    Jan 29 at 14:07












up vote
3
down vote



accepted







up vote
3
down vote



accepted






All the software sources in your /etc/apt/sources.list file that have the string wily (Ubuntu 15.10) in them are conflicting with your Ubuntu 14.04 software sources and preventing you from installing apache2. To fix this, preface each line that has the strings wily or xenial in it by a # character in order to turn it into a comment.



Edit the /etc/apt/sources.list file with nano text editor. Open the terminal and type:



sudo nano /etc/apt/sources.list 


A standard sources.list file for Ubuntu 14.04 looks like this:



deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu trusty partner
deb http://extras.ubuntu.com/ubuntu trusty main


Every line in the above standard sources.list file has the string trusty in it because you are using Ubuntu 14.04. Adding repositories of other Ubuntu releases such as 15.10 or 16.04 to your Ubuntu 14.04 software sources is very bad package management.



Nano editor keyboard shortcuts
Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location.
Use the keyboard combination Ctrl + X to exit nano.



Update the list of available software and install apache2.



sudo apt update 
sudo apt install apache2





share|improve this answer














All the software sources in your /etc/apt/sources.list file that have the string wily (Ubuntu 15.10) in them are conflicting with your Ubuntu 14.04 software sources and preventing you from installing apache2. To fix this, preface each line that has the strings wily or xenial in it by a # character in order to turn it into a comment.



Edit the /etc/apt/sources.list file with nano text editor. Open the terminal and type:



sudo nano /etc/apt/sources.list 


A standard sources.list file for Ubuntu 14.04 looks like this:



deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu trusty partner
deb http://extras.ubuntu.com/ubuntu trusty main


Every line in the above standard sources.list file has the string trusty in it because you are using Ubuntu 14.04. Adding repositories of other Ubuntu releases such as 15.10 or 16.04 to your Ubuntu 14.04 software sources is very bad package management.



Nano editor keyboard shortcuts
Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location.
Use the keyboard combination Ctrl + X to exit nano.



Update the list of available software and install apache2.



sudo apt update 
sudo apt install apache2






share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 17 at 5:00

























answered Jan 29 at 13:06









karel

51.9k11110133




51.9k11110133











  • thanks for answer , but still same result as here : prntscr.com/i75fsi
    – spylh9999ggr
    Jan 29 at 13:09










  • thanks for update, i tried sudo add-apt-repository --remove ppa to remove all PPAs & tried sudo apt-get update & sudo apt-get install apache2 but still same result.....
    – spylh9999ggr
    Jan 29 at 13:26











  • sorry for that, okay i deleted sources.list.d folder from /etc/apt , then did sudo apt-get update & sudo apt-get install apache2, still i am getting same error.....
    – spylh9999ggr
    Jan 29 at 13:36







  • 1




    please check : prntscr.com/i761hq
    – spylh9999ggr
    Jan 29 at 13:45










  • i done as your update, prntscr.com/i76e4d still getting same error .....
    – spylh9999ggr
    Jan 29 at 14:07
















  • thanks for answer , but still same result as here : prntscr.com/i75fsi
    – spylh9999ggr
    Jan 29 at 13:09










  • thanks for update, i tried sudo add-apt-repository --remove ppa to remove all PPAs & tried sudo apt-get update & sudo apt-get install apache2 but still same result.....
    – spylh9999ggr
    Jan 29 at 13:26











  • sorry for that, okay i deleted sources.list.d folder from /etc/apt , then did sudo apt-get update & sudo apt-get install apache2, still i am getting same error.....
    – spylh9999ggr
    Jan 29 at 13:36







  • 1




    please check : prntscr.com/i761hq
    – spylh9999ggr
    Jan 29 at 13:45










  • i done as your update, prntscr.com/i76e4d still getting same error .....
    – spylh9999ggr
    Jan 29 at 14:07















thanks for answer , but still same result as here : prntscr.com/i75fsi
– spylh9999ggr
Jan 29 at 13:09




thanks for answer , but still same result as here : prntscr.com/i75fsi
– spylh9999ggr
Jan 29 at 13:09












thanks for update, i tried sudo add-apt-repository --remove ppa to remove all PPAs & tried sudo apt-get update & sudo apt-get install apache2 but still same result.....
– spylh9999ggr
Jan 29 at 13:26





thanks for update, i tried sudo add-apt-repository --remove ppa to remove all PPAs & tried sudo apt-get update & sudo apt-get install apache2 but still same result.....
– spylh9999ggr
Jan 29 at 13:26













sorry for that, okay i deleted sources.list.d folder from /etc/apt , then did sudo apt-get update & sudo apt-get install apache2, still i am getting same error.....
– spylh9999ggr
Jan 29 at 13:36





sorry for that, okay i deleted sources.list.d folder from /etc/apt , then did sudo apt-get update & sudo apt-get install apache2, still i am getting same error.....
– spylh9999ggr
Jan 29 at 13:36





1




1




please check : prntscr.com/i761hq
– spylh9999ggr
Jan 29 at 13:45




please check : prntscr.com/i761hq
– spylh9999ggr
Jan 29 at 13:45












i done as your update, prntscr.com/i76e4d still getting same error .....
– spylh9999ggr
Jan 29 at 14:07




i done as your update, prntscr.com/i76e4d still getting same error .....
– spylh9999ggr
Jan 29 at 14:07

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1000996%2fe-package-apache2-has-no-installation-candidate%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491