Question

hi follow y tutorial install lamp but i got error E: Package 'php5-mysql' has no installation candidate how fix this .thanks for help

E: Package ‘php5-mysql’ has no installation candidate


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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

  1. Add PHP repository
  1. sudo add-apt-repository ppa:ondrej/php
  1. Refresh APT cache with
  1. sudo apt-get update

After it completes successfully, PHP5 is ready to be installed:

  1. sudo apt-get install php5.6

Please make sure when you want to install modules, specify it with php5.6. For example:

  1. sudo apt-get install php5.6-mbstring
  2. 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!

dl