win10系统在执行“ vagrant box add centos7 vagrant-centos-7.box”添加box时,报错“Vagrant failed to initialize at a very early stage: Failed to locate the powershell executable on the available PATH. ”

时间:2022-03-29 13:35:51

win10系统在执行“ vagrant box add centos7 vagrant-centos-7.box”添加box时,报错“Vagrant failed to initialize at a very early stage:  Failed to locate the powershell executable on the available PATH. ”

这个意思是:
在有效的路径中未能执行PowerShell命令. 请检查PowerShell的安装和有效的路径,然后再尝试重新运行这个命令。

在环境变量path中添加powershell的路径,例如:C:\Windows\System32\WindowsPowerShell\v1.0

以上未生效,最后:在C:\Windows\System32\WindowsPowerShell\v1.0中双击执行这个powershell,成功执行

win10系统在执行“ vagrant box add centos7 vagrant-centos-7.box”添加box时,报错“Vagrant failed to initialize at a very early stage:  Failed to locate the powershell executable on the available PATH. ”

win10系统在执行“ vagrant box add centos7 vagrant-centos-7.box”添加box时,报错“Vagrant failed to initialize at a very early stage:  Failed to locate the powershell executable on the available PATH. ”

参考:https://zhidao.baidu.com/question/140326749776799965.html