Vagrant up 失败 为什么一直显示 powershell 版本过低?

环境:
windows 7

一执行下面的命令,就会出现powershell版本过低

vagrant up

错误提示:

The version of powershell currently installed on this host is less than
the required minimum version. Please upgrade the installed version of
powershell to the minimum required version and run the command again.
Installed version: N/A
Minimum required version: 3

本地的powershell就算更新了,3.0,4.0,5.0,也还是显示版本过低:

Name : ConsoleHost
Version : 4.0
InstanceId : 49d1da7b-5453-4a69-9e44-b0bbdb638d83
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : zh-CN
CurrentUICulture : zh-CN
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace

《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
最佳答案

需要装5.1 的 或者https://blog.csdn.net/cow66/article/details/77993908 我之前也是一样的错误,现在已经可以启动了

5年前 评论
讨论数量: 8

@simaguo 你的意思是cmd的问题吗,这个版本过低吗?

5年前 评论

解决了吗?我也遇到了这个问题,都将powershell更新至4.0版本了,还是失败

5年前 评论

@oldE 没有解决,不过可能不是这个原因,有些时候可以,有些时候就显示这信息。我猜应该是vagrant还没有完全启动,所以获取不了powershell的版本。如果你找到了解决办法,麻烦告知,谢谢。

5年前 评论

需要装5.1 的 或者https://blog.csdn.net/cow66/article/details/77993908 我之前也是一样的错误,现在已经可以启动了

5年前 评论

@liang00 是要版本匹配,有些版本高了,改动太大,所以就导致了这个错误。升级到powershell 5.1可以解决

5年前 评论
liuqing_hu

这个问题是 PowerShell 版本过低导致的,到 官网 下载对应版本的 PowerShell。

Windows 7 可以安装 PS3 和 PS4 这两个版本。

5年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!