Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling PHP from source with MySQL version 5.6

I am trying to compile PHP from source to get ZTS working. I have the source for PHP and I try to install the dependencies with

apt-get build-dep php5

I also have MySQL 5.6 installed for Ubuntu 14.04LTS and I am getting this error after the command:

The following packages have unmet dependencies: mysql-server : Depends: mysql-server-5.5 but it is not going to be installed E: Build-dependencies for php5 could not be satisfied.

Is there anyway to bypass this dependency as MySQL 5.6 works ok with prebuilt PHP5 but I cannot start compiling as the dependency is missing? Thanks!

like image 763
drodil Avatar asked May 20 '14 06:05

drodil


3 Answers

Although not the same issue this MySQL bug report hints at a solution. Try the following steps:

  1. Uninstall mysql-client-5.6 and mysql-server-5.6: [sudo] apt-get remove mysql-client-5.6 mysql-server-5.6.

  2. Initiate your [sudo] apt-get build-dep php5 command. Allow necessary dependencies to be built automatically prior to upgrading again.

  3. Reinstall mysql-5.6. This should replace all references to mysql-5.5. Use the command [sudo] apt-get install mysql-client-5.6 mysql-server-5.6.

like image 80
smcjones Avatar answered Nov 16 '22 09:11

smcjones


This is just a shot in the darkness, but can you try installing the mysql 5.5 first with the required php builds and once you are done, upgrade the mysql to 5.6

like image 2
Ali Avatar answered Nov 16 '22 09:11

Ali


Why do you use apt-get build-dep instead of install? According to man page of apt-get, "build-deps" will try to remove the installed package to resolve the dependency which here is mysql-server-5.6 . I simply used install and it works.

apt-get install php5

To test if php is using mysql-5.6 I installed PhpMyadmin using apt-get and it works fine with 5.6, you can do the same thing and in the Variables page check for the variable named "Version".

Just as an FYI apt-get build-dep is different from building from source.

like image 2
MKoosej Avatar answered Nov 16 '22 10:11

MKoosej