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'컴퓨터 가져 오기 ... 이 컴퓨터의 구성에 오류가 있습니다. 다음과 같은 오류를 수정하시기 바랍니다 다시 시도 : 쉘 제공자 : * 다음 설정이 존재하지 않아야 다음 설정이 존재하지 않아야 * 이름 : 이름 * 다음과 같은 설정이 존재하지 않아야 이름 * 다음 설정이 없어야합니다. 이름 * 다음 설정이 없어야합니다. 이름 * 다음 설정이 없어야합니다. 이름 – Muthu17
정확히 같은 오류가있는 것 같습니다. 호스트 이름 행을 주석으로 처리하십시오. 나는 또한 내가 가지고있는 샘플 Homestead.yaml 파일을 게시 할 것이다. 나는 당신이 '이름'또는 '호스트 이름'이 필요하다고 생각하지 않는다. 모든 호스트 이름은 별도의 파일 (/ etc/hosts)을 통해 수행되어야합니다. –