3

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
  • 4,379

1 Answers1

3

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
  • 72,312