php – Unable to locate package libapache2-mod-php7

php – Unable to locate package libapache2-mod-php7

The name of the package is libapache2-mod-php7.0
Try again by having that .0 at the end and it should work.

On Ubuntu 18.04, I had to add the repository below first. Once the repo was added I was able to install the php7.x items.

sudo add-apt-repository ppa:ondrej/php

Source: https://websiteforstudents.com/apache2-with-php-7-1-support-on-ubuntu-18-04-lts-beta-server/

php – Unable to locate package libapache2-mod-php7

If you are using Ubuntu 17.04/17.10 or above use php7.1 instead of 7.0 since it is no longer available.

sudo apt-get install php7.1

Leave a Reply

Your email address will not be published.