Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to locate package libapache2-mod-php7

I tried installing php in ubuntu 16.04 using following command:

sudo apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi  php7.0 libapache2-mod-php7 

but it says

Unable to locate package libapache2-mod-php7

Should I skip this or install by an alternative way?

like image 233
Nishan Rai Avatar asked Aug 07 '16 14:08

Nishan Rai


People also ask

What is libapache2 mod php7 4?

This package provides the PHP module for the Apache 2 webserver (as found in the apache2-mpm-prefork package).

What is libapache2 Mod PHP?

This package provides the PHP module for the Apache 2 webserver. PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.


2 Answers

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

like image 71
rinSer Avatar answered Sep 22 '22 13:09

rinSer


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/

like image 23
James Graham Avatar answered Sep 21 '22 13:09

James Graham