Question

How to install php7.0-fpm on Ubuntu 18.04 server

I have a laravel app that works perfectly with php 7.0. But on 7.2 many features are not working. So I would like to remove 7.2 from my server and install 7.0.
I could only find this command in the help

sudo apt-install php7.0-fpm

but when I run this I get the following error.

Reading package lists… Done Building dependency tree Reading state information… Done E: Unable to locate package php7.0-fpm E: Couldn’t find any package by glob ‘php7.0-fpm’ E: Couldn’t find any package by regex ‘php7.0-fpm’

What can I do to solve this problem.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You make syntax error: sudo apt-install php7.0-fpm must be sudo apt-get install php7.0-fpm

I tried following the steps to get the latest version working, but ran into issues with the first line sudo apt-get install python-software-properties

I get

This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  software-properties-common```

I come from this [guide](https://www.digitalocean.com/community/tutorials/automatically-deploy-laravel-applications-deployer-ubuntu), and the fourth step 

The php-xml and php-mbstring packages installed on your server. Install these by running: sudo apt-get install php7.0-mbstring php7.0-xml.


is running into this error 

Reading package lists… Done Building dependency tree Reading state information… Done E: Unable to locate package php7.0-mbstring E: Couldn’t find any package by glob ‘php7.0-mbstring’ E: Couldn’t find any package by regex ‘php7.0-mbstring’


Granted, I haven't installed Nginx, but am using Apache instead. Is that what's causing this headache? Because I can't seem to find any answers out there.