Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mismatch between php version and php-config version

Tags:

php

php-5.6

I am using Ubuntu 14.04.

Recently, I updated from php5.5 to php5.6 following this link:https://www.dev-metal.com/install-setup-php-5-6-ubuntu-14-04-lts/ (i.e. adding the ppa:ondrej/php5-5.6 repository)

After that php-config --version is showing 5.5.9 while php -v is showing 5.6.18.

I had to install some extensions using pecl. But pecl follows php-config and installs extensions not compatible with php5.6. None of my newly installed versions are working due to this. I am stuck on this for 2 days. Any help is appreciated.

PS: Somewhere I found that I may have two different php-config binaries located in different paths, but I could find only one.

like image 657
Raghuram Vadapalli Avatar asked Sep 15 '25 00:09

Raghuram Vadapalli


1 Answers

php-config is part of the php5-dev package.

In case the ppa:ondrej/php5-5.6 repository provides that as well (it should)

sudo apt-get install php5-dev

should fix that.
(I wonder though why there's a isn't a dependecy declared that updates the php5-dev package when php5 is updated....)

like image 161
VolkerK Avatar answered Sep 17 '25 14:09

VolkerK