在php 5.6 Amazon Linux AMI上安装xdebug

我创建了一个Elastic Beanstalk环境

ID_LIKE="rhel fedora"
VERSION_ID="2016.03"
PRETTY_NAME="Amazon Linux AMI 2016.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2016.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"

我正在尝试使用安装xdebug

sudo yum install php-pecl-xdebug

但我一直得到以下错误

Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package php-pecl-xdebug.x86_64 0:2.2.3-1.5.amzn1 will be installed
--> Processing Dependency: php(api) = 20090626-x86-64 for package: php-pecl-xdebug-2.2.3-1.5.amzn1.x86_64
--> Processing Dependency: php(zend-abi) = 20090626-x86-64 for package: php-pecl-xdebug-2.2.3-1.5.amzn1.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.3.29-1.8.amzn1 will be installed
--> Processing Conflict: php56-common-5.6.21-1.124.amzn1.x86_64 conflicts php-common < 5.5.22-1.98
--> Finished Dependency Resolution
Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我应该用什么呢?作为参考,我如何确定哪些包可用?
非常感谢.

解决方法:

php-pecl-xdebug依赖于Amazon Linux 2.3的默认PHP版本.由于您安装了PHP 5.6,因此您将遇到冲突.

不幸的是,看起来Amazon Linux只有xdebug的软件包,最高可达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.

由于有PECL包,您可以通过以下方式安装它:

[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/
上一篇:linux – 即使在退出命令后,Shell脚本仍继续运行


下一篇:Redhat 6.8部署oracle 12c