0

I would want to have up running wamps server, php, and mySql on my Ubuntu desktop 17.10. However, I was failed with following:

sudo apt-get install apache2 mysql-server php5 php-pear php5-suhosin php5-mysql


Reading package lists... Done
Building dependency tree       
Reading state information... Done
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

Package php5 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' has no installation candidate
E: Unable to locate package php5-suhosin
E: Package 'php5-mysql' has no installation candidate

Any guidance to help sort out of this issued? I need to have wamps php and mySql for my php web application. Thanks in advanced for help.

1 Answers1

1

You are trying to install ancient versions of PHP. In 17.10, the default version of PHP is 7.1, and no packages for PHP5 are available. 14.04 supports PHP5, but unless you are hosting an app that needs PHP5, there's zero reason to go with PHP5.

Try the following command, which is basically what you tried, but by not specifying PHP version. This will install PHP7, and apache.

sudo apt-get install apache2 mysql-server php php-pear php-mysql

If you get any error messages, it may be because the universe repository is not enabled. To enable universe, have a look at this Q&A

You may also want to have a look at this Q&A which walks you trough setting up vhosts and ssl.

Suhosin is no longer under active development and is not available for PHP7 afaik.

vidarlo
  • 22,691