Search code examples
xdebugphp-5.4

Not able to install xdebug on Ubuntu 12.04 LTS


I am not able to install xdebug on Ubuntu 12.04 LTS.

The instruction I received from xdebug wizard are as follows:-

  1. Download xdebug-2.4.0beta1.tgz
  2. Unpack the downloaded file with tar -xvzf xdebug-2.4.0beta1.tgz
  3. Run: cd xdebug-2.4.0beta1
  4. Run: ./configure
  5. Run: make
  6. Run: cp modules/xdebug.so /usr/lib/php5/20100525
  7. Update /etc/php5/cli/php.ini and change the line zend_extension = /usr/lib/php5/20100525/xdebug.so

On executing .configure I am getting the below error:-

checking Check for supported PHP versions... configure: error: not supported. Need a PHP version >= 5.4.0 (found 5.3.10-1ubuntu3.21)

But php -v is giving the below output:-

PHP 5.4.45-2+deb.sury.org~precise+2 (cli) (built: Oct  4 2015 16:12:54) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

But php-config --version is reporting as follows (which is causing the problem):- 5.3.10-1ubuntu3.21

I have upgraded Php to 5.4 as mentioned in this link under the section "Add a PPA and install newer a newer version of PHP"

Can someone let me know how to fix this?


Solution

  • After doing the upgrade as mentioned in this link sudo apt-get upgrade was used which held some of the packages from upgrading. Doing sudo apt-get dist-upgrade solved the issue.