2

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"
sotirov
  • 3,169
Shandorius
  • 49
  • 1
  • 1
  • 5
  • Did you do sudo apt-get update again after you changed the source.list? – Jos Nov 05 '18 at 11:49
  • libapache2-mod-fastcgi php-fpm package available in Universe Repository, enabled it, update your apt and install it again – abu-ahmed al-khatiri Nov 05 '18 at 11:51
  • @Jos Yes i did, but unfortunately it did not change a thing. – Shandorius Nov 05 '18 at 13:30
  • @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 Nov 05 '18 at 13:32
  • 1
    @user535733 I would like to thank you for linking the other question, but unfortunately it did not solve my problem. – Shandorius Nov 05 '18 at 13:33
  • 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. – user535733 Nov 05 '18 at 14:56

1 Answers1

2

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
Zanna
  • 70,465
Shandorius
  • 49
  • 1
  • 1
  • 5
  • 1
    Use like this,

    cd /tmp && wget http://mirrors.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; sudo apt install -f

    – Apurba Pathak Jun 18 '19 at 04:13
  • i also came from the same source : https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-web-server-and-reverse-proxy-for-apache-on-one-ubuntu-16-04-server – Saleh Abdulaziz Sep 20 '19 at 18:00