curren php,PHP 开发版本问题处理

阅读: 评论:0

curren php,PHP 开发版本问题处理

curren php,PHP 开发版本问题处理

在安装一个开源项目时,作者本地用了 PHP 7.1 进行开发,而我本地是 PHP 7.0, 于是悲剧发生了,出现了这样的错误:requires php ^7.1 -> your PHP version (7.0.13) does not satisfy that requirement..

一、Composer 安装包

composer install 之后报错

vagrant@homestead:~/Code/sample$ composer install

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

- Installation request for doctrine/instantiator 1.1.0 -> satisfiable by doctrine/instantiator[1.1.0].

- doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.13) does not satisfy that requirement.

Problem 2

- doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.13) does not satisfy that requirement.

- phpunit/phpunit-mock-objects 2.3.8 requires doctrine/instantiator ^1.0.2 -> satisfiable by doctrine/instantiator[1.1.0].

- Installation request for phpunit/phpunit-mock-objects 2.3.8 -> satisfiable by phpunit/phpunit-mock-objects[2.3.8].

二、解决方法

删除 composer.lock 文件,重新执行 composer install,这样就能重新生成 composer.lock 文件了。

composer 包自动加载后,会生成一个 composer.lock 锁文件,所以,在从GitHub拉取别人的代码后,需要对这个文件进行删除。

本文发布于:2024-02-01 09:48:45,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170675212535778.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:版本   curren   php   PHP
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23