我无法通过尝试执行composer install命令在服务器https://prnt.sc/tqrb6n上安装Magento 2。也许会有人知道怎么做。如何解决此问题。
[root@junisoft junisoft.ru]# composer instal
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php ~7.3.0||~7.4.0 but your PHP version (7.1.28) does not satisfy that requirement.
Problem 2
- Installation request for magento/composer 1.6.0 -> satisfiable by magento/composer[1.6.0].
- magento/composer 1.6.0 requires php ~7.3.0||~7.4.0 -> your PHP version (7.1.28) does not satisfy that requirement.发布于 2020-07-30 14:01:23
看起来问题出在你当前的php版本上。安装magento需要您的php7.3版本
你可以通过下面的命令来验证你当前的php版本。
php -v它将显示当前的PHP版本。
您可以通过以下命令更改命令行PHP版本
update-alternatives --config php在您的案例中,要解决上述错误,请将其更改为php7.3 (如果需要),您可以在命令前面加上sudo访问权限。
对于webversion php change,您可以运行
a2enmod php7.* 将7.*替换为所需的版本,然后重新启动apache或ngix服务
在Apache2中,您还可以运行以下命令
/etc/init.d/apache2 restart如果需要sudo权限,则可以使用sudo访问权限运行该命令。
注意:对于一些与服务器相关的操作,请确保在具有一定知识的情况下运行此命令,或者您也可以向服务器管理员帮助进行配置。
https://stackoverflow.com/questions/63161600
复制相似问题