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

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








up vote
2
down vote

favorite
1












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?



Screen shot of error while installing apache2










share|improve this question























  • Please edit your question and add output of apt-cache policy apache2 to it.
    – N0rbert
    Mar 23 at 15:47






  • 2




    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






  • 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














up vote
2
down vote

favorite
1












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?



Screen shot of error while installing apache2










share|improve this question























  • Please edit your question and add output of apt-cache policy apache2 to it.
    – N0rbert
    Mar 23 at 15:47






  • 2




    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






  • 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












up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





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?



Screen shot of error while installing apache2










share|improve this question















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?



Screen shot of error while installing apache2







apt server package-management apache2






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 23 at 16:49

























asked Mar 23 at 15:43









Kiran Shahi

209113




209113











  • Please edit your question and add output of apt-cache policy apache2 to it.
    – N0rbert
    Mar 23 at 15:47






  • 2




    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






  • 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
















  • Please edit your question and add output of apt-cache policy apache2 to it.
    – N0rbert
    Mar 23 at 15:47






  • 2




    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






  • 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















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










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





share|improve this answer



























    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.






    share|improve this answer






















    • Thank you for your answer. But I need to install LAMP manually.
      – Kiran Shahi
      Mar 23 at 17:03










    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%2f1018602%2fe-package-apache2-has-no-installation-candidate-on-ubuntu-17-10%23new-answer', 'question_page');

    );

    Post as a guest






























    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





    share|improve this answer
























      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





      share|improve this answer






















        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





        share|improve this answer












        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






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 23 at 16:57









        N0rbert

        16k33275




        16k33275






















            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.






            share|improve this answer






















            • Thank you for your answer. But I need to install LAMP manually.
              – Kiran Shahi
              Mar 23 at 17:03














            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.






            share|improve this answer






















            • Thank you for your answer. But I need to install LAMP manually.
              – Kiran Shahi
              Mar 23 at 17:03












            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.






            share|improve this answer














            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.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            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
















            • 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

















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            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













































































            Popular posts from this blog

            Which professions warranted travel in Medieval times?

            Trouble downloading packages list due to a “Hash sum mismatch” error

            How do so many people here on Academia.SE, and in general, afford lavish higher education programs?