Installing xdebug on php 5.6 Amazon Linux AMI

依然范特西╮ 提交于 2019-12-05 20:16:02

The php-pecl-xdebug depends on the default version of PHP for Amazon Linux, 2.3. Since you have PHP 5.6 installed, you're getting a conflict.

Unfortunately, it looks like Amazon Linux only has packages for xdebug up to PHP 5.5:

[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo yum search xdebug
Loaded plugins: priorities, update-motd, upgrade-helper
============================= N/S matched: xdebug ==============================
php-pecl-xdebug.x86_64 : PECL package for debugging PHP scripts
php54-pecl-xdebug.x86_64 : PECL package for debugging PHP scripts
php55-pecl-xdebug.x86_64 : PECL package for debugging PHP scripts

  Name and summary matches only, use "search all" for everything.

Since there is a PECL package, you can install it through that:

[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo yum install php-pear php56-devel gcc
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo mount -o remount,exec /var/tmp/
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo pecl install xdebug
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo mount -o remount,noexec /var/tmp/
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!