skip to Main Content

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

2

Answers


  1. If Ubuntu first you need install php dev version:

    sudo apt install php7.x-dev
    

    And then:

    sudo pecl install xdebug
    
    Login or Signup to reply.
  2. 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!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search