E: Package ‘php5-mysql’ has no installation candidate
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.
hi i am new about ubuntu i am working on magento project i want to install lamp+magento bcose magento new version is compatibale is ubuntu 16.04 32 bit please guide me how i will start
to install lamp i learn lot of tutorial but not acurate ans
Hi @monu2jan ,
As of Ubuntu 16.04, PHP7 is default and recommended version. If you want to switch to PHP7 make sure that application is compatible with it (also it is recommended to test it before taking in production).
Anyways to install PHP5 you need to ad repository and install it.
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
After it completes successfully, PHP5 is ready to be installed:
sudo apt-get install php5.6
Please make sure when you want to install modules, specify it with php5.6.
sudo apt-get install php5.6-mbstring
sudo apt-get install php5.6-mcrypt
If you go with php instead of php5.6 it will try to install PHP7 version of module.
Note: Make sure you delete older/newer version before installation
Hi monu2jan. Ubuntu 16.04 comes with PHP7, so installing PHP5 takes some extra steps. If you were using a tutorial written for 14.04, it may not have been appropriate for the droplet you’ve created.
Is PHP5 a requirement, or can you work with 7?
I recommend creating a Droplet using the “One-click apps” option. There are LAMP droplets available there for 14.04 (PHP5) and 16.04 (PHP7). You can get started creating a One-click app here.
Hope this helps!
Join 1M+ other developers and: