By techassist
Error Message: Package php5-mysql is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package ‘php5-mysql’ has no installation candidate
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!
This worked for me. I installed apache first with sudo apt-get install apache2 and added ufw allow port 80 and 8080.
Then I tried to install mysql and php, but 5 wasn’t valid, so instead it is sudo apt-get install mysql-server php-mysql instead of php5-mysql
Next I did sudo apt-get install php7.0 php7.0-mcrypt
Then I authorized mysql and php in ufw. ALL worked fine.
PHP5 is no longer included as of Ubuntu 16.04 as it has been replaced with PHP 7. Instead of the package php5-mysql you will want to install the package php-mysql. For other PHP related stuff you will use php7.0 as in php7.0-gzip in place of php5-gzip
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.