E: Package 'apache2' has no installation candidate

 Clash Royale CLAN TAG#URR8PPP
Clash 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 
14.04 package-management apache2 software-sources
add a comment |Â
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 
14.04 package-management apache2 software-sources
 
 
 
 
 
 
 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 updateand 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
 
 
 
add a comment |Â
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 
14.04 package-management apache2 software-sources
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
14.04 package-management apache2 software-sources
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 updateand 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
 
 
 
add a comment |Â
 
 
 
 
 
 
 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 updateand 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
add a comment |Â
 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 
 
 
 
 
 
 
 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 ppato remove all PPAs & tried- sudo apt-get update&- sudo apt-get install apache2but still same result.....
 â spylh9999ggr
 Jan 29 at 13:26
 
 
 
 
 
 
 
 
 
 
 sorry for that, okay i deleted- sources.list.dfolder 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
 
 
 
 |Â
show 4 more comments
 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 
 
 
 
 
 
 
 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 ppato remove all PPAs & tried- sudo apt-get update&- sudo apt-get install apache2but still same result.....
 â spylh9999ggr
 Jan 29 at 13:26
 
 
 
 
 
 
 
 
 
 
 sorry for that, okay i deleted- sources.list.dfolder 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
 
 
 
 |Â
show 4 more comments
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 
 
 
 
 
 
 
 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 ppato remove all PPAs & tried- sudo apt-get update&- sudo apt-get install apache2but still same result.....
 â spylh9999ggr
 Jan 29 at 13:26
 
 
 
 
 
 
 
 
 
 
 sorry for that, okay i deleted- sources.list.dfolder 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
 
 
 
 |Â
show 4 more comments
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 
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 
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 ppato remove all PPAs & tried- sudo apt-get update&- sudo apt-get install apache2but still same result.....
 â spylh9999ggr
 Jan 29 at 13:26
 
 
 
 
 
 
 
 
 
 
 sorry for that, okay i deleted- sources.list.dfolder 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
 
 
 
 |Â
show 4 more comments
 
 
 
 
 
 
 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 ppato remove all PPAs & tried- sudo apt-get update&- sudo apt-get install apache2but still same result.....
 â spylh9999ggr
 Jan 29 at 13:26
 
 
 
 
 
 
 
 
 
 
 sorry for that, okay i deleted- sources.list.dfolder 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
 |Â
show 4 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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 updateand 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