E Package Apache2 Has No Installation Candidate Dashboard
When i try to install php5 in Ubuntu 16.04 by using following code:
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 In order to add that package, download it and install it manually. How to Install ownCloud 10 on Ubuntu Debian and. Install Apache2. Package ‘php5’ has no installation candidate E: Package ‘php5-gd’ has no. Author:spylh9999ggr When I tried to install apache2 on Ubuntu 14.04, I got the following error message: root@Final-Gitsetup-Developers:~# apt-get install apache2 Reading package lists.
I get following error:
I have tried reinstalling but it does not help.
All this error was encountered after I updated my 15.10 Ubuntu to 16.04
7 Answers
Ubuntu 16.04 comes with PHP7 as the standard, so there are no PHP5 packages
However if you like you can add a PPA to get those packages anyways:
Remove all the stock php packages
Php5 Has No Installation Candidate
List installed php packages with dpkg -l grep php awk '{print $2}' tr 'n' ' '
then remove unneeded packages with sudo aptitude purge your_packages_here or if you want to directly remove them all use :
Add the PPA
Install your PHP Version
You can install php5.6 modules too ..
Verify your version
Based on https://askubuntu.com/a/756186/532957 (thanks @AhmedJerbi)
You must use prefix 'php5.6-' instead of 'php5-' as in ubuntu 14.04 and olders:
If you just want to install PHP no matter what version it is, try PHP7
Currently, I am using Ubuntu 16.04 LTS.Me too was facing same problem while Fetching the Postgress Database values using Php so i resolved it by using the below commands.
Mine PHP version is 7.0, so i tried the below command.
apt-get install php-pgsql
Remember to restart Apache.
I recently had this issue as well and solved it using the following command:
php is now installed. I'm using Ubuntu 18.04.
Not the answer you're looking for? Browse other questions tagged phpubuntuaptdpkgubuntu-16.04 or ask your own question.
Got error E: Package 'apache2' has no installation candidate
while installing apache2 with sudo apt-get install apache2
on Ubuntu 17.10.Here is the message displayed on terminal.
Message after apt-cache policy apache2
command.
Message after egrep -v '^# ^ *$' /etc/apt/sources.list /etc/apt/sources.list.d/*.list
command
How can I solve this issue?
2 Answers
The main problem is missed /etc/apt/sources.list
.You can recreate it with:
Then run
Try sudo apt-get update
and then sudo apt-get install apache2
.I recommend installing the complete LAMP Stack using tasksel
sudo tasksel
to launch itSelect LAMP server and install it.Hope that helps.