3

I'm trying to install xdebug.

I've already seen some issues about it (like this one : Installing xdebug with PHP 5.5 ) but it seems outdated and not corresponding to my issue).

When I try

sudo pecl install xdebug

I'm getting the following error

WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update

downloading xdebug-2.8.0.tgz ...

Starting to download xdebug-2.8.0.tgz (238,122 bytes) .................................................done: 238,122 bytes

69 source files, building

running: phpize sh: 1: phpize: not found ERROR: `phpize' failed

It seems that means phpize isn't installed in my php version

php -v

PHP 7.2.24-0ubuntu0.19.04.1 (cli) (built: Oct 24 2019 11:49:39) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.24-0ubuntu0.19.04.1, Copyright (c) 1999-2018, by Zend Technologies

So, some topics seems to tell me to change my php version to download a version with phpsize included. But I was more looking for a way to add phpsize to my current php version but I don't know how to do that.

Thanks for your assistance

10
  • What os are you used? Commented Nov 28, 2019 at 14:41
  • stackoverflow.com/questions/3108937/… Commented Nov 28, 2019 at 14:42
  • @Dmitry Ubuntu like shown in the php -v. Ihave already seen that topic but that means I have to install a new php version then ? Commented Nov 28, 2019 at 14:45
  • 1
    I think you need install php7.x-dev version also. Commented Nov 28, 2019 at 14:47
  • 1
    I think php7.2 not dev Commented Nov 28, 2019 at 14:57

2 Answers 2

4

If Ubuntu first you need install php dev version:

sudo apt install php7.x-dev

And then:

sudo pecl install xdebug
Sign up to request clarification or add additional context in comments.

7 Comments

Show php -v output
Didn't change from the one in question
Oh wait I have modified the apache/php.ini I might should have modified the cli/php.ini instead maybe ?
And indeed It was the wrong php.ini file I modified.
Check it cli/php.ini.
|
0

I had some problems with xdebug version too. I had to install an specific version for php7.1 using PECL,

I don't really know if your question is already solved but let me share you this webpage, it's the compatibility graph to know wich version works with an specific php versions:

https://xdebug.org/docs/compat

As far as I know if you want to install the latest xdebug version you can use the repo, but if you need an old version you'll be forced to install it using PECL.

Hope you find this answer usefull!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.