前提・実現したいこと
これまでXAMPPでLaravelを勉強しておりました。
今回、初めてHomesteadを用いたLaravelの環境構築を試しているのですが、途中でエラーが出て進めず悩んでいます。
Laravelの公式ドキュメントに従い、
- VirtualBoxのインストール
- Vagrantのインストール
vagrant box add laravel/homestead
でHomestead Vagrant Boxをインストールgit clone https://github.com/laravel/homestead.git ~/Homestead
でHomesteadをインストール- Homesteadディレクトリで
git checkout release
bash init .sh
- ユーザーディレクトリ下(C:\Users\xxx\)にcodeディレクトリを作成
- Homestead.yamlファイルの「folders: - map:」のパスを「C:\Users\xxx\code」に書き換えて保存
vagrant up
という手順で行いました。
発生している問題・エラーメッセージ
以下のエラーメッセージが出ます。
xxx@yyy MINGW64 ~/Homestead (release) $ vagrant up Bringing machine 'homestead' up with 'virtualbox' provider... ==> homestead: [vagrant-hostsupdater] Checking for host entries C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:126:in `digest': no implicit conversion of nil into String (TypeError) from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:126:in `hexdigest' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:126:in `signature' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:73:in `createHostEntry' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:42:in `block (2 levels) in addHostEntries' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:36:in `each' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:36:in `block in addHostEntries' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:35:in `each' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:35:in `addHostEntries' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/Action/UpdateHosts.rb:17:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/commands/up/middleware/store_box_metadata.rb:33:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/virtualbox/action/created.rb:15:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `block in run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:in `busy' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builtin/call.rb:43:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `block in run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:in `busy' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:246:in `action_raw' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:215:in `block in action' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:613:in `lock' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:201:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:201:in `action' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
Homestead.yamlの内容
--- ip: "192.168.10.10" memory: 2048 cpus: 2 provider: virtualbox authorize: ~/.ssh/id_rsa.pub keys: - ~/.ssh/id_rsa folders: - map: C:\Users\xxx\code to: /home/vagrant/code sites: - map: homestead.test to: /home/vagrant/code/public databases: - homestead features: - mysql: false - mariadb: false - ohmyzsh: false - webdriver: false # ports: # - send: 50000 # to: 5000 # - send: 7777 # to: 777 # protocol: udp
試したこと
- 公開鍵はC:\Users\xxx.sshディレクトリにおいて
ssh-keygen
コマンドで作成しました。 - Homestead.yamlのauthorize及びkeysをコメントアウトしてみましたが変わりません。
- Homestead.yamlのauthorize及びkeysを「C:\Users\xxx\」からの絶対パスに書き換えてみましたが変わりません。
- カスペルスキーを終了させてみましたが変わりません。
- 「bcdedit /set hypervisorlaunchtype off」コマンドでHyper-Vを無効にできると聞き、正しく終了しましたが変わりません。
- XAMPPのApacheを停止しましたが変わりません。
- VirtualBoxに別にインストールしたUbuntuは起動できます。
- Cドライブの容量は100G近く残っています。
補足情報(FW/ツールのバージョンなど)
OS:Windows10 Home 20H2
ターミナル:Git Bash
VirtualBox:6.1.16
Vagrant:2.2.14
git 2.28.0
あなたの回答
tips
プレビュー