Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Problema para Instalar o xDebug no Linux

Olá!

Estou usando a versão 7.4.3 do PHP na minha máquina com o Ubuntu 20.04.

Quando eu digito o comando para fazer a instalação:

pecl install xdebug

Aparece a seguinte mensagem de erro:

Xdebug could not open the remote debug file '/tmp/xdebug_remote.log'.

Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187
PHP Notice:  Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187
PHP Stack trace:
PHP   1. {main}() /usr/share/php/peclcmd.php:0
PHP   2. require_once() /usr/share/php/peclcmd.php:31
PHP   3. PEAR_Command_Install->run($command = 'install', $options = array (), $params = array (0 => 'xdebug-beta')) /usr/share/php/pearcmd.php:316
PHP   4. PEAR_Command_Install->doInstall($command = 'install', $options = array (), $params = array (0 => 'xdebug-beta')) /usr/share/php/PEAR/Command/Common.php:270
PHP   5. PEAR_Downloader->download($params = array (0 => 'channel://pecl.php.net/xdebug-beta')) /usr/share/php/PEAR/Command/Install.php:666
PHP   6. PEAR_Downloader_Package->initialize($param = 'channel://pecl.php.net/xdebug-beta') /usr/share/php/PEAR/Downloader.php:296
PHP   7. PEAR_Downloader_Package->_fromString($param = 'channel://pecl.php.net/xdebug-beta') /usr/share/php/PEAR/Downloader/Package.php:189
PHP   8. PEAR_Downloader->_getPackageDownloadUrl($parr = array ('package' => 'xdebug', 'channel' => 'pecl.php.net', 'state' => 'beta')) /usr/share/php/PEAR/Downloader/Package.php:1706
PHP   9. PEAR_REST_10->getDownloadURL($base = 'http://pecl.php.net/rest/', $packageinfo = array ('package' => 'xdebug', 'channel' => 'pecl.php.net', 'state' => 'beta'), $prefstate = 'beta', $installed = FALSE, $channel = 'pecl.php.net') /usr/share/php/PEAR/Downloader.php:870
PHP  10. PEAR_REST->retrieveData($url = 'http://pecl.php.net/rest/r/xdebug/allreleases.xml', $accept = FALSE, $forcestring = FALSE, $channel = 'pecl.php.net') /usr/share/php/PEAR/REST/10.php:74
PHP  11. PEAR_REST->useLocalCache($url = 'http://pecl.php.net/rest/r/xdebug/allreleases.xml', $cacheid = FALSE) /usr/share/php/PEAR/REST.php:80

Notice: Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187

Call Stack:
    0.0002     410544   1. {main}() /usr/share/php/peclcmd.php:0
    0.0007     477992   2. require_once('/usr/share/php/pearcmd.php') /usr/share/php/peclcmd.php:31
    0.0199    1928848   3. PEAR_Command_Install->run(string(7), array(0), array(1)) /usr/share/php/pearcmd.php:316
    0.0199    1928848   4. PEAR_Command_Install->doInstall(string(7), array(0), array(1)) /usr/share/php/PEAR/Command/Common.php:270
    0.0249    3097008   5. PEAR_Downloader->download(array(1)) /usr/share/php/PEAR/Command/Install.php:666
    0.0261    3356152   6. PEAR_Downloader_Package->initialize(string(34)) /usr/share/php/PEAR/Downloader.php:296
    0.0261    3356216   7. PEAR_Downloader_Package->_fromString(string(34)) /usr/share/php/PEAR/Downloader/Package.php:189
    0.0264    3359040   8. PEAR_Downloader->_getPackageDownloadUrl(array(3)) /usr/share/php/PEAR/Downloader/Package.php:1706
    0.0277    3544224   9. PEAR_REST_10->getDownloadURL(string(25), array(3), string(4), false, string(12)) /usr/share/php/PEAR/Downloader.php:870
    0.0277    3544712  10. PEAR_REST->retrieveData(string(49), false, false, string(12)) /usr/share/php/PEAR/REST/10.php:74
    0.0278    3544712  11. PEAR_REST->useLocalCache(string(49), false) /usr/share/php/PEAR/REST.php:80


Variables in local scope (#11):
  $cacheid = FALSE
  $cacheidfile = *uninitialized*
  $cachettl = 3600
  $url = 'http://pecl.php.net/rest/r/xdebug/allreleases.xml'

Alguém já passou pelo mesmo problema ou sabe o que pode ser?

Desde já obrigado!

1 resposta
solução!

Aparentemente era um bug da versão do pecl que você tem instalada.

https://bugs.php.net/bug.php?id=78890

Tenta atualizar pra ver se resolve. :-)

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software