我正在Ubuntu上安装Phalcon框架。我用Apache做网络服务器。我安装了phalcon和psr。我可以在输出phalcon和psr中找到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].原因何在?我需要添加其他命令吗?
发布于 2020-06-02 07:40:03
我认为您从Ubuntu中本地安装了php-psr,而您的编写器请求版本0.7。您可以尝试先用apt remove php-psr卸载Ubuntu包。
再试一次,当问题1是固定的,它可能是一个依赖问题,因为第一个问题。
https://askubuntu.com/questions/1246025
复制相似问题