E: Package 'apache2' has no installation candidate on Ubuntu 17.10

Clash Royale CLAN TAG#URR8PPP up vote
2
down vote
favorite
Got error E: Package 'apache2' has no installation candidate while installing apache2 with sudo apt-get install apache2 on Ubuntu 17.10.
Here is the message displayed on terminal.
sudo 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
E: Package 'apache2' has no installation candidate
Message after apt-cache policy apache2 command.
apache2:
Installed: (none)
Candidate: (none)
Version table:
Message after egrep -v '^#|^ *$' /etc/apt/sources.list /etc/apt/sources.list.d/*.list command
/etc/apt/sources.list.d/linuxgndu-ubuntu-sqlitebrowser-artful.list:deb http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu artful main
/etc/apt/sources.list.d/mongodb-org-3.6.list:deb [arch=amd64,arm64] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse
/etc/apt/sources.list.d/slack.list:deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
/etc/apt/sources.list.d/sublime-text.list:deb https://download.sublimetext.com/ apt/stable/
/etc/apt/sources.list.d/vscode.list:deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
/etc/apt/sources.list.d/webupd8team-ubuntu-java-artful.list:deb http://ppa.launchpad.net/webupd8team/java/ubuntu artful main
How can I solve this issue?

apt server package-management apache2
 |Â
show 2 more comments
up vote
2
down vote
favorite
Got error E: Package 'apache2' has no installation candidate while installing apache2 with sudo apt-get install apache2 on Ubuntu 17.10.
Here is the message displayed on terminal.
sudo 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
E: Package 'apache2' has no installation candidate
Message after apt-cache policy apache2 command.
apache2:
Installed: (none)
Candidate: (none)
Version table:
Message after egrep -v '^#|^ *$' /etc/apt/sources.list /etc/apt/sources.list.d/*.list command
/etc/apt/sources.list.d/linuxgndu-ubuntu-sqlitebrowser-artful.list:deb http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu artful main
/etc/apt/sources.list.d/mongodb-org-3.6.list:deb [arch=amd64,arm64] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse
/etc/apt/sources.list.d/slack.list:deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
/etc/apt/sources.list.d/sublime-text.list:deb https://download.sublimetext.com/ apt/stable/
/etc/apt/sources.list.d/vscode.list:deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
/etc/apt/sources.list.d/webupd8team-ubuntu-java-artful.list:deb http://ppa.launchpad.net/webupd8team/java/ubuntu artful main
How can I solve this issue?

apt server package-management apache2
Please edit your question and add output ofapt-cache policy apache2to it.
â N0rbert
Mar 23 at 15:47
2
Also please add the contents of your/etc/apt/sources.listfile.
â pomsky
Mar 23 at 15:49
inside /etc/apt/ there is no sources.list file
â Kiran Shahi
Mar 23 at 15:57
2
The install command issudo apt update && sudo apt install apache2
â Knud Larsen
Mar 23 at 16:07
2
Possible duplicate of Trying to install apache.But, when I type in the command it shows this error. Could anyone give me any solution, tried everything
â pa4080
Mar 23 at 16:08
 |Â
show 2 more comments
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Got error E: Package 'apache2' has no installation candidate while installing apache2 with sudo apt-get install apache2 on Ubuntu 17.10.
Here is the message displayed on terminal.
sudo 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
E: Package 'apache2' has no installation candidate
Message after apt-cache policy apache2 command.
apache2:
Installed: (none)
Candidate: (none)
Version table:
Message after egrep -v '^#|^ *$' /etc/apt/sources.list /etc/apt/sources.list.d/*.list command
/etc/apt/sources.list.d/linuxgndu-ubuntu-sqlitebrowser-artful.list:deb http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu artful main
/etc/apt/sources.list.d/mongodb-org-3.6.list:deb [arch=amd64,arm64] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse
/etc/apt/sources.list.d/slack.list:deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
/etc/apt/sources.list.d/sublime-text.list:deb https://download.sublimetext.com/ apt/stable/
/etc/apt/sources.list.d/vscode.list:deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
/etc/apt/sources.list.d/webupd8team-ubuntu-java-artful.list:deb http://ppa.launchpad.net/webupd8team/java/ubuntu artful main
How can I solve this issue?

apt server package-management apache2
Got error E: Package 'apache2' has no installation candidate while installing apache2 with sudo apt-get install apache2 on Ubuntu 17.10.
Here is the message displayed on terminal.
sudo 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
E: Package 'apache2' has no installation candidate
Message after apt-cache policy apache2 command.
apache2:
Installed: (none)
Candidate: (none)
Version table:
Message after egrep -v '^#|^ *$' /etc/apt/sources.list /etc/apt/sources.list.d/*.list command
/etc/apt/sources.list.d/linuxgndu-ubuntu-sqlitebrowser-artful.list:deb http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu artful main
/etc/apt/sources.list.d/mongodb-org-3.6.list:deb [arch=amd64,arm64] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse
/etc/apt/sources.list.d/slack.list:deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
/etc/apt/sources.list.d/sublime-text.list:deb https://download.sublimetext.com/ apt/stable/
/etc/apt/sources.list.d/vscode.list:deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
/etc/apt/sources.list.d/webupd8team-ubuntu-java-artful.list:deb http://ppa.launchpad.net/webupd8team/java/ubuntu artful main
How can I solve this issue?

apt server package-management apache2
apt server package-management apache2
edited Mar 23 at 16:49
asked Mar 23 at 15:43
Kiran Shahi
209113
209113
Please edit your question and add output ofapt-cache policy apache2to it.
â N0rbert
Mar 23 at 15:47
2
Also please add the contents of your/etc/apt/sources.listfile.
â pomsky
Mar 23 at 15:49
inside /etc/apt/ there is no sources.list file
â Kiran Shahi
Mar 23 at 15:57
2
The install command issudo apt update && sudo apt install apache2
â Knud Larsen
Mar 23 at 16:07
2
Possible duplicate of Trying to install apache.But, when I type in the command it shows this error. Could anyone give me any solution, tried everything
â pa4080
Mar 23 at 16:08
 |Â
show 2 more comments
Please edit your question and add output ofapt-cache policy apache2to it.
â N0rbert
Mar 23 at 15:47
2
Also please add the contents of your/etc/apt/sources.listfile.
â pomsky
Mar 23 at 15:49
inside /etc/apt/ there is no sources.list file
â Kiran Shahi
Mar 23 at 15:57
2
The install command issudo apt update && sudo apt install apache2
â Knud Larsen
Mar 23 at 16:07
2
Possible duplicate of Trying to install apache.But, when I type in the command it shows this error. Could anyone give me any solution, tried everything
â pa4080
Mar 23 at 16:08
Please edit your question and add output of
apt-cache policy apache2 to it.â N0rbert
Mar 23 at 15:47
Please edit your question and add output of
apt-cache policy apache2 to it.â N0rbert
Mar 23 at 15:47
2
2
Also please add the contents of your
/etc/apt/sources.list file.â pomsky
Mar 23 at 15:49
Also please add the contents of your
/etc/apt/sources.list file.â pomsky
Mar 23 at 15:49
inside /etc/apt/ there is no sources.list file
â Kiran Shahi
Mar 23 at 15:57
inside /etc/apt/ there is no sources.list file
â Kiran Shahi
Mar 23 at 15:57
2
2
The install command is
sudo apt update && sudo apt install apache2â Knud Larsen
Mar 23 at 16:07
The install command is
sudo apt update && sudo apt install apache2â Knud Larsen
Mar 23 at 16:07
2
2
Possible duplicate of Trying to install apache.But, when I type in the command it shows this error. Could anyone give me any solution, tried everything
â pa4080
Mar 23 at 16:08
Possible duplicate of Trying to install apache.But, when I type in the command it shows this error. Could anyone give me any solution, tried everything
â pa4080
Mar 23 at 16:08
 |Â
show 2 more comments
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
The main problem is missed /etc/apt/sources.list.
You can recreate it with:
cat <<EOF | sudo tee /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-backports main universe restricted multiverse
EOF
Then run
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install apache2
add a comment |Â
up vote
2
down vote
Try sudo apt-get update and then sudo apt-get install apache2.
I recommend installing the complete LAMP Stack using tasksel
sudo apt-get install tasksel
sudo tasksel to launch it
Select LAMP server and install it.
Hope that helps.
Thank you for your answer. But I need to install LAMP manually.
â Kiran Shahi
Mar 23 at 17:03
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
The main problem is missed /etc/apt/sources.list.
You can recreate it with:
cat <<EOF | sudo tee /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-backports main universe restricted multiverse
EOF
Then run
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install apache2
add a comment |Â
up vote
4
down vote
accepted
The main problem is missed /etc/apt/sources.list.
You can recreate it with:
cat <<EOF | sudo tee /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-backports main universe restricted multiverse
EOF
Then run
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install apache2
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
The main problem is missed /etc/apt/sources.list.
You can recreate it with:
cat <<EOF | sudo tee /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-backports main universe restricted multiverse
EOF
Then run
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install apache2
The main problem is missed /etc/apt/sources.list.
You can recreate it with:
cat <<EOF | sudo tee /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-backports main universe restricted multiverse
EOF
Then run
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install apache2
answered Mar 23 at 16:57
N0rbert
16k33275
16k33275
add a comment |Â
add a comment |Â
up vote
2
down vote
Try sudo apt-get update and then sudo apt-get install apache2.
I recommend installing the complete LAMP Stack using tasksel
sudo apt-get install tasksel
sudo tasksel to launch it
Select LAMP server and install it.
Hope that helps.
Thank you for your answer. But I need to install LAMP manually.
â Kiran Shahi
Mar 23 at 17:03
add a comment |Â
up vote
2
down vote
Try sudo apt-get update and then sudo apt-get install apache2.
I recommend installing the complete LAMP Stack using tasksel
sudo apt-get install tasksel
sudo tasksel to launch it
Select LAMP server and install it.
Hope that helps.
Thank you for your answer. But I need to install LAMP manually.
â Kiran Shahi
Mar 23 at 17:03
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Try sudo apt-get update and then sudo apt-get install apache2.
I recommend installing the complete LAMP Stack using tasksel
sudo apt-get install tasksel
sudo tasksel to launch it
Select LAMP server and install it.
Hope that helps.
Try sudo apt-get update and then sudo apt-get install apache2.
I recommend installing the complete LAMP Stack using tasksel
sudo apt-get install tasksel
sudo tasksel to launch it
Select LAMP server and install it.
Hope that helps.
edited Mar 23 at 16:52
N0rbert
16k33275
16k33275
answered Mar 23 at 16:28
Pranal Narayan
989
989
Thank you for your answer. But I need to install LAMP manually.
â Kiran Shahi
Mar 23 at 17:03
add a comment |Â
Thank you for your answer. But I need to install LAMP manually.
â Kiran Shahi
Mar 23 at 17:03
Thank you for your answer. But I need to install LAMP manually.
â Kiran Shahi
Mar 23 at 17:03
Thank you for your answer. But I need to install LAMP manually.
â Kiran Shahi
Mar 23 at 17:03
add a comment |Â
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%2f1018602%2fe-package-apache2-has-no-installation-candidate-on-ubuntu-17-10%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
Please edit your question and add output of
apt-cache policy apache2to it.â N0rbert
Mar 23 at 15:47
2
Also please add the contents of your
/etc/apt/sources.listfile.â pomsky
Mar 23 at 15:49
inside /etc/apt/ there is no sources.list file
â Kiran Shahi
Mar 23 at 15:57
2
The install command is
sudo apt update && sudo apt install apache2â Knud Larsen
Mar 23 at 16:07
2
Possible duplicate of Trying to install apache.But, when I type in the command it shows this error. Could anyone give me any solution, tried everything
â pa4080
Mar 23 at 16:08