LoginSignup
0
0

More than 5 years have passed since last update.

[windows7] vagrant up でエラーが出る。[powershell]

Last updated at Posted at 2018-06-07

Windows7でvagrant upをしたらエラーが吐かれて解決したお話

結論から申し上げますと、powershellのPATHを環境変数に追加してねというお話です。

ただ、僕のようにwindowsに不慣れ & windows 7 & 初心者 という状況の人がいるかもしれませんので残しておきます。

環境

  • windows 7
  • Git Bash

エラー内容

$ vagrant up
The executable 'powershell' Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.
  • powershellのPATHが見当たらないという話。
    • 正直、なぜpowershellのPATHが必要なのかよく分かっていない。

解決策

システム環境変数にPATHを追加します。
1. コンピューター → プロパティ → システムの詳細設定 → 環境変数へ移動

キャプチャ.PNG

  1. システム環境変数一覧からPATHを探し、"編集"で変数を追加する。
    • ※もしPATHが無いのであれば"新規"でOK

キャプチャ2.PNG

  • 変数値の文字列の一番後ろに;C:\Windows\System32\WindowsPowerShell\v1.0を追加してOK
    • これで追加完了。
    • 追加後、開いているGit Bashなどは再起動させること。これをしないと、追加した変数を読み取ってくれない。

さぁもう一度vagrant up

$ 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: 2

  Minimum required version: 3

はい次のエラーーーーーーー涙涙
(これはpowershellのバージョンが要求しているものより低いものがインストールされているからアップグレードしてねというものなので、今のものとは関係ないはず。)

とりあえず、今回解決したかったエラーは解決したのでこの記事はここまで。
アップグレードの記事は探せばたくさん出てくると思いますので、Tryしてみてください。
もし無かったら、また書きます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0