问题 1

问题 1

我正在 Ubuntu 上安装 Phalcon 框架。我使用 Apache 作为 Web 服务器。我安装了phalcon和。我可以在输出中psr找到phalcon和:psrphpinfo()

phpinfo() 输出

使用时composer install,我收到以下错误:

  Problem 1
    - The requested PHP extension ext-psr ^0.7 has the wrong version (1.0.0) installed. Install or enable PHP's psr extension.
  Problem 2
    - phalcon/devtools v4.0.3 requires vlucas/phpdotenv ^3.6 -> satisfiable by vlucas/phpdotenv[3.6.x-dev, v3.6.0, v3.6.1, v3.6.2, v3.6.3, v3.6.4, v3.6.5] but these conflict with your requirements or minimum-stability.
    - phalcon/devtools v4.0.2 requires vlucas/phpdotenv ^3.6 -> satisfiable by vlucas/phpdotenv[3.6.x-dev, v3.6.0, v3.6.1, v3.6.2, v3.6.3, v3.6.4, v3.6.5] but these conflict with your requirements or minimum-stability.
    - phalcon/devtools v4.0.1 requires vlucas/phpdotenv ^3.6 -> satisfiable by vlucas/phpdotenv[3.6.x-dev, v3.6.0, v3.6.1, v3.6.2, v3.6.3, v3.6.4, v3.6.5] but these conflict with your requirements or minimum-stability.
    - phalcon/devtools v4.0.0 requires vlucas/phpdotenv ^3.6 -> satisfiable by vlucas/phpdotenv[3.6.x-dev, v3.6.0, v3.6.1, v3.6.2, v3.6.3, v3.6.4, v3.6.5] but these conflict with your requirements or minimum-stability.
    - Installation request for phalcon/devtools ~4.0 -> satisfiable by phalcon/devtools[v4.0.0, v4.0.1, v4.0.2, v4.0.3].

这是什么原因?我需要添加其他命令吗?

答案1

问题 1

我认为您是php-psr从 Ubuntu 软件包本地安装的,而您的作曲家要求版本 0.7。您可以先尝试使用 卸载 Ubuntu 软件包apt remove php-psr

问题 2

当问题 1 修复后再试一次,这可能是由于第一个问题引起的依赖问题。

相关内容