Can't install libapache2-mod-fastcgi and php-fpm

11,774

I came across this problem by doing a Digital Ocean tutorial whilst trying to set-up an NGINX Apache2 reverse proxy. Turns out the tutorial was wrong and that libapache2-mod-fastcgi package isn't available in the Ubuntu repositories, so the command they gave was incorrect. It has to be obtained externally (at least now, maybe it was accurate before).

Funnily enough I found the correct way to do it in a different Digital Ocean tutorial, which can be viewed below along with the source.

These commands worked for me:

wget https://mirrors.edge.kernel.org/ubuntu/pool/multiverse/liba/libapache-mod-fastcgi/libapache2-mod-fastcgi_2.4.7~0910052141-1.2_amd64.deb
sudo dpkg -i libapache2-mod-fastcgi_2.4.7~0910052141-1.2_amd64.deb
Share:
11,774

Related videos on Youtube

Shandorius
Author by

Shandorius

Updated on September 18, 2022

Comments

  • Shandorius
    Shandorius almost 2 years

    So I am trying to install these two packages. I first tried doing the following

    sudo apt-get update
    sudo apt-get install -yy apache2 libapache2-mod-fastcgi php-fpm
    

    this returned:

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package libapache2-mod-fastcgi
    E: Unable to locate package php-fpm
    

    So I then tried:

    sudo apt-get update
    sudo apt-get install -yy apache2 
    sudo apt-get install -yy libapache2-mod-fastcgi php-fpm
    

    The apache2 will install but for the last line it still gives the same error. I tried looking online if I was perhaps missing a repo, but I couldn't find anything that made me believe so. Next to that I also changed my source.list to have multiverse behind any of them. But this still did not work.. What might be the issue?

    my source.list:

    deb http://archive.ubuntu.com/ubuntu bionic main multiverse
    deb http://archive.ubuntu.com/ubuntu bionic-security main multiverse
    deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse
    

    After being redirected by one of you to a problem which explained I had to add the universe repo, I did the following:

    sudo add-apt-repository universe
    sudo apt-get update
    

    this gives the error:

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package libapache2-mod-fastcgi 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 'libapache2-mod-fastcgi' has no installation candidate
    

    I also tried

    sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
    

    Thanks everyone!

    • Jos
      Jos over 5 years
      Did you do sudo apt-get update again after you changed the source.list?
    • abu-ahmed al-khatiri
      abu-ahmed al-khatiri over 5 years
      libapache2-mod-fastcgi php-fpm package available in Universe Repository, enabled it, update your apt and install it again
    • Shandorius
      Shandorius over 5 years
      @Jos Yes i did, but unfortunately it did not change a thing.
    • Shandorius
      Shandorius over 5 years
      @abu-ahmedal-khatiri I added it and updated it according to the other question you included. Although it got me a step further a different error occurs now.
    • Shandorius
      Shandorius over 5 years
      @user535733 I would like to thank you for linking the other question, but unfortunately it did not solve my problem.
    • user535733
      user535733 over 5 years
      Comments are intended to help you improve the question, not for conversation. Please update your question...by editing the question. Short responses like "It didn't work" and "a different error occurs now" do not provide enough information to help you - please edit your question with a more full description of exactly what has changed.
  • Apurba Pathak
    Apurba Pathak about 5 years
    Use like this, cd /tmp && wget mirrors.kernel.org/ubuntu/pool/multiverse/liba/… sudo dpkg -i libapache2-mod-fastcgi_2.4.7~0910052141-1.2_amd64.deb; sudo apt install -f
  • Saleh Abdulaziz
    Saleh Abdulaziz almost 5 years
    i also came from the same source : digitalocean.com/community/tutorials/…