【问题标题】:Installing xdebug on php 5.6 Amazon Linux AMI在 php 5.6 Amazon Linux AMI 上安装 xdebug
【发布时间】:2016-05-18 22:02:24
【问题描述】:

我创建了一个 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

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

【问题讨论】:

    标签: linux amazon-web-services redhat xdebug fedora


    【解决方案1】:

    php-pecl-xdebug 取决于适用于 Amazon Linux 的 PHP 的默认版本 2.3。由于您安装了 PHP 5.6,因此您遇到了冲突。

    不幸的是,Amazon Linux 似乎只有针对 PHP 5.5 的 xdebug 软件包:

    [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/
    

    【讨论】:

    • 太好了,非常感谢!我什至不需要重新安装。
    猜你喜欢
    • 2014-06-03
    • 1970-01-01
    • 2015-05-05
    • 2019-08-06
    • 1970-01-01
    • 2014-12-03
    • 2017-01-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多