我正在尝试在一个空目录中运行composer require phpseclib/mcrypt_compat:dev-master
,但出现以下错误:
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for phpseclib/mcrypt_compat dev-master -> satisfiable by phpseclib/mcrypt_compat[dev-master].
- phpseclib/mcrypt_compat dev-master requires phpseclib/phpseclib dev-master -> satisfiable by phpseclib/phpseclib[d
ev-master] but these conflict with your requirements or minimum-stability.
Installation failed, deleting ./composer.json.
我不理解这个。 https://github.com/phpseclib/phpseclib/blob/master/composer.json 显示所需的最低 PHP 版本为 5.6.1。还有两个其他的库是必需的,但是 Composer 没有说这些其他的库是不兼容的 - Composer 说 phpseclib / phpseclib 不兼容。
当我输入
php -v
时,这是我的输出:PHP 7.0.26 (cli) (built: Nov 22 2017 13:19:37) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
PHP 7.0.26比PHP 5.6.1更新,而phpseclib/phpseclib:dev-master所需的最低版本是PHP 5.6.1。
你有什么想法吗?
composer require vendor/package dev-master
应该可以工作。 - Charlotte Dunois