I'm trying to install xdebug in my recently upgraded Ubuntu 20.04.1
When I place the output of phpinfo() in https://xdebug.org/wizard I get:
Installation Wizard
Summary
Xdebug installed: no
Server API: Apache 2.0 Handler
Windows: no
Zend Server: no
PHP Version: 7.2.34
Zend API nr: 320170718
PHP API nr: 20170718
Debug Build: no
Thread Safe Build: no
OPcache Loaded: no
Configuration File Path: /opt/lampp/etc
Configuration File: /opt/lampp/etc/php.ini
Extensions directory: /opt/lampp/lib/php/extensions/no-debug-non-zts-20170718
The installation recommends me to install the version: xdebug-3.0.1 But when I follow the instructions I get this error from the terminal:
The following packages have unmet dependencies:
php-dev : Depends: php7.4-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
How can I solve this problem? Should I install an older package of xdebug to be compatible with my php7.2 version?
Thanks in advance.
I solved the problem by installing php7.2-dev in my Ubuntu 20.04.1
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update
sudo apt-get install php7.2-dev
After that I could run phpize and still use XDebug 3.
set php v7.2(optional)
update-alternatives --set php /usr/bin/php7.2
then set and update all needed for php7.2:
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update
sudo apt-get install -y php7.2 php7.2-xdebug
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.