我已经使用PHP v3.2.2
和7.0.21
安装了XAMPP composer 1.5.1
并在laravel version 5.4.36
上构建了一个应用程序。
安装spatie/laravel-analytics
软件包时遇到错误:
Problem 1
- This package requires php >=7.0 but your PHP version (5.6.4) does not satisfy that
requirement.
Problem 2
- Installation request for spatie/laravel-analytics ^3.1.0 -> satisfiable by
spatie/laravel-analytics[3.1.0].
- spatie/laravel-analytics 3.1.0 requires php ^7.0 -> your PHP version (7.0.21) overridden
by "config.platform.php" version (5.6.4) does not satisfy that requirement.
我有一句话:
"require": {
"php": ">=5.6.4",
................
}
在我的composer.json
文件上。从laracast上的帖子中读取我将“php”:“> = 5.6.4”更改为“php”:“> = 7.0”并运行命令composer dump-autoload
和composer update
并收到错误消息:
Problem 1
- This package requires php >=7.0 but your PHP version (5.6.4) does not satisfy that
requirement.
如果有人能够指出导致此错误的原因及其可能的解决方案,我将非常感激。
答案 0 :(得分:0)
重新安装composer并手动选择php7文件夹