私はlaravel homesteadの仮想ホストにVagrantとVirtual boxを使用しています。私が迷惑な人を上げると、私は次のエラーが出ます。Mac:Laravel homestead-vagrant upエラー
Bringing machine '***********' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:
shell provisioner:
* The following settings shouldn't exist: name
* The following settings shouldn't exist: name
* The following settings shouldn't exist: name
* The following settings shouldn't exist: name
* The following settings shouldn't exist: name
* The following settings shouldn't exist: name
これは私の浮浪者ファイルです:私はちょうどその行を命じたので、浮浪者の
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'json'
require 'yaml'
VAGRANTFILE_API_VERSION ||= "2"
confDir = $confDir ||= File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__))
homesteadYamlPath = "Homestead.yaml"
homesteadJsonPath = "Homestead.json"
afterScriptPath = "after.sh"
aliasesPath = "aliases"
require File.expand_path(confDir + '/scripts/homestead.rb')
#Vagrant.require_version '>= 1.8.4'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if File.exist? aliasesPath then
config.vm.provision "file", source: aliasesPath, destination: "/tmp/bash_aliases"
config.vm.provision "shell" do |s|
s.inline = "awk '{ sub(\"\r$\", \"\"); print }' /tmp/bash_aliases > /home/vagrant/.bash_aliases"
end
end
if File.exist? homesteadYamlPath then
settings = YAML::load(File.read(homesteadYamlPath))
elsif File.exist? homesteadJsonPath then
settings = JSON.parse(File.read(homesteadJsonPath))
end
Homestead.configure(config, settings)
if File.exist? afterScriptPath then
config.vm.provision "shell", path: afterScriptPath, privileged: false
end
if defined? VagrantPlugins::HostsUpdater
config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] }
end
end
そのショーに必要な高いバージョン。
これは私が私の仮想ボックスと放浪のバージョンをアップグレードすることで、それは問題を解決することを知っている私のHomestead.yaml
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
hostname: *******"
name: *******"
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: "/Users/*******"
to: "/home/vagrant//*******""
sites:
- map: *******.app
to: "/home/vagrant/*******/public"
databases:
- *******
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
です。しかし、私は現在のバーチャルボックスで既存のララールプロジェクトを失ってしまった。ボックスをアップグレードすると、古いアプリケーションのエラーが表示されます。
これを解決する方法を教えてもらえますか?
グレートを。私たちは近くにいるといいですね。しかし、今はデフォルトのマシン名を取得中です。エラー:マシン 'ホームステッド7'を 'virtualbox'プロバイダに持ってきて... このマシンの設定にエラーがあります。 次のエラーを修正して、もう一度お試しください: シェルプロビジョニングを: *以下の設定が存在してはいけません:以下の設定が存在してはならない* に名前を付ける:名前 *以下の設定が存在してはならない* に名前を付けます次の設定は存在しないはずです:名前 *次の設定は存在してはいけません:名前 *次の設定は存在してはいけません:名前 – Muthu17
全く同じエラーのようです。ホスト名行もコメントアウトしてみてください。私はそれが動作しているサンプルHomestead.yamlファイルも投稿します。私はあなたが '名前'または 'ホスト名'が必要だとは思わない。すべてのホスト名は、別のファイル(/ etc/hosts)を使って行う必要があります。 –