2016-03-20 12 views
2

Ich habe das Tutorial auf https://laravel.com/docs/5.0/homestead gefolgt und beim Ausführen des Schritts "vagrant up", bekomme ich die folgende Fehlermeldung (unten) Irgendwelche Ideen, was das Problem ist? Ausführen der neuesten Version von Oracle VirtualBox und der neuesten Version von Vagrant. GrüßeVagrant Laravel Homestead - Fehler beim Ausführen von Vagabund up

-

C:\Users\Anders\Vagrant\Homestead>vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Importing base box 'laravel/homestead'... 
==> default: Matching MAC address for NAT networking... 
==> default: Checking if box 'laravel/homestead' is up to date... 
==> default: Setting the name of the VM: homestead-7 
==> default: Clearing any previously set network interfaces... 
==> default: Preparing network interfaces based on configuration... 
    default: Adapter 1: nat 
    default: Adapter 2: hostonly 
==> default: Forwarding ports... 
    default: 80 (guest) => 8000 (host) (adapter 1) 
    default: 443 (guest) => 44300 (host) (adapter 1) 
    default: 3306 (guest) => 33060 (host) (adapter 1) 
    default: 5432 (guest) => 54320 (host) (adapter 1) 
    default: 22 (guest) => 2222 (host) (adapter 1) 
==> default: Running 'pre-boot' VM customizations... 
==> default: Booting VM... 
==> default: Waiting for machine to boot. This may take a few minutes... 
    default: SSH address: 127.0.0.1:2222 
    default: SSH username: vagrant 
    default: SSH auth method: private key 
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace 
    default: this with a newly generated keypair for better security. 
    default: 
    default: Inserting generated public key within guest... 
    default: Removing insecure key from the guest if it's present... 
    default: Key inserted! Disconnecting and reconnecting using new SSH key... 
==> default: Machine booted and ready! 
GuestAdditions versions on your host (5.0.16) and guest (5.0.12) do not match. 
Reading package lists... 
Building dependency tree... 
Reading state information... 
dkms is already the newest version. 
linux-headers-3.19.0-25-generic is already the newest version. 
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. 
Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the 
box /tmp/VBoxGuestAdditions.iso 
mount: block device /tmp/VBoxGuestAdditions.iso is write-protected, mounting rea 
d-only 
Installing Virtualbox Guest Additions 5.0.16 - guest version is 5.0.12 
Verifying archive integrity... All good. 
Uncompressing VirtualBox 5.0.16 Guest Additions for Linux............ 
VirtualBox Guest Additions installer 
Removing installed version 5.0.12 of VirtualBox Guest Additions... 
Stopping VirtualBox Additions ...fail! 
(Cannot unload module vboxguest) 
Removing existing VirtualBox DKMS kernel modules ...done. 
Removing existing VirtualBox non-DKMS kernel modules ...done. 
Stopping VirtualBox Guest Addition service ...done. 
Copying additional installer modules ... 
Installing additional modules ... 
Removing existing VirtualBox DKMS kernel modules ...done. 
Removing existing VirtualBox non-DKMS kernel modules ...done. 
Building the VirtualBox Guest Additions kernel modules ...done. 
Doing non-kernel setup of the Guest Additions ...done. 
You should restart your guest to make sure the new modules are actually used 

Installing the Window System drivers 
Could not find the X.Org or XFree86 Window System, skipping. 
An error occurred during installation of VirtualBox Guest Additions 5.0.16. Some 
functionality may not work as intended. 
In most cases it is OK that the "Window System drivers" installation failed. 
==> default: Checking for guest additions in VM... 
==> default: Setting hostname... 
==> default: Configuring and enabling network interfaces... 
==> default: Mounting shared folders... 
    default: /vagrant => C:/Users/Anders/Vagrant/Homestead 
    default: /home/vagrant/Code => C:/Users/Anders/Code 
Failed to mount folders in Linux guest. This is usually because 
the "vboxsf" file system is not available. Please verify that 
the guest additions are properly installed in the guest and 
can work properly. The command attempted was: 

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3`, 
actimeo=1 home_vagrant_Code /home/vagrant/Code 
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant`,actimeo=1 home_vagran 
t_Code /home/vagrant/Code 

The error output from the last command was: 

unknown mount option `actimeo=1' 
valid options: 
    rw   mount read write (default) 
    ro   mount read only 
    uid  =<arg> default file owner user id 
    gid  =<arg> default file owner group id 
    ttl  =<arg> time to live for dentry 
    iocharset =<arg> i/o charset (default utf8) 
    convertcp =<arg> convert share name from given charset to utf8 
    dmode  =<arg> mode of all directories 
    fmode  =<arg> mode of all regular files 
    umask  =<arg> umask of directories and regular files 
    dmask  =<arg> umask of directories 
    fmask  =<arg> umask of regular files 

C:\Users\Anders\Vagrant\Homestead> 

-

vagrant Datei:

-

require 'json' 
require 'yaml' 

VAGRANTFILE_API_VERSION = "2" 
confDir = $confDir ||= File.expand_path("~/.homestead") 

homesteadYamlPath = confDir + "/Homestead.yaml" 
homesteadJsonPath = confDir + "/Homestead.json" 
afterScriptPath = confDir + "/after.sh" 
aliasesPath = confDir + "/aliases" 

require File.expand_path(File.dirname(__FILE__) + '/scripts/homestead.rb') 

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
    if File.exists? aliasesPath then 
     config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases" 
    end 

    if File.exists? homesteadYamlPath then 
     Homestead.configure(config, YAML::load(File.read(homesteadYamlPath))) 
    elsif File.exists? homesteadJsonPath then 
     Homestead.configure(config, JSON.parse(File.read(homesteadJsonPath))) 
    end 

    if File.exists? afterScriptPath then 
     config.vm.provision "shell", path: afterScriptPath 
    end 
end 

-

yaml Datei:

-

--- 
ip: "192.168.10.10" 
memory: 2048 
cpus: 1 
provider: virtualbox 

authorize: ~/Vagrant/Homestead/homestead.pub 

keys: 
    - ~/.ssh/id_rsa 

folders: 
    - map: ~/Code 
     to: /home/vagrant/Code 
     type: "nfs" 

sites: 
    - map: homestead.app 
     to: /home/vagrant/Code/Laravel/public 
     hhvm: true 

databases: 
    - homestead 
+0

Ihre Datei "Homestead.yaml" enthält "Tabs" anstelle von Leerzeichen. –

+0

danke - scheint etwas repariert zu haben. Jetzt bekomme ich einen weiteren Fehler. – AHL

Antwort

5

Die issue you're experiencing mit Homestead wurde in Github dokumentiert. Es gibt eine Problemumgehung, die wie folgt lautet:

Lösung: Entfernen Sie Typ: "NFS" in Ihren Ordnern von Homestead.yaml.

http://docs.vagrantup.com/v2/synced-folders/nfs.html

„Windows-Benutzer:.. NFS Ordner funktionieren nicht auf Windows-Hosts Vagrant wird ignorieren Sie Ihre Anfrage für NFS synchronisiert Ordner unter Windows


Original-Antwort (für die Frage bevor es bearbeitet wurde)

Jetzt scheint das Problem mit Ihrem ssh-Schlüssel zu sein, oder fehlt von.

No such file or directory @ rb_sysopen - C:/Users/Anders/.ssh/id_rsa (Errno::ENOENT) 

Der Abschnitt in the guide you linked betitelt Legen Sie Ihre SSH Key folgende Anweisungen, die Sie einen (getrimmt auf die entsprechenden Windows-Anweisungen) erzeugen zu helfen hat: Key

[

Legen Sie Ihre SSH .. .]

Unter Windows können Sie Git installieren und die in Git enthaltene Shell Git Bash verwenden, um den obigen Befehl auszuführen. Alternativ können Sie PuTTY und PuTTYgen verwenden.

Sobald Sie einen SSH-Schlüssel erstellt haben, geben Sie den Pfad des Schlüssels in der Eigenschaft authorize Ihrer Homestead.yaml-Datei an.

Wenn Sie mit Befehlszeilen nicht so vertraut sind, würde ich die PuTTYgen-Methode empfehlen.

+1

danke Brian Morton -> Ich gebe die Befehle durch meine GitShell auf Windows und löste das Problem. Neues Problem, das oben bearbeitet wurde – AHL

+0

@HLHL können Sie genau erklären, was Ihr aktuelles Problem ist? Die ursprüngliche Frage ist jetzt ziemlich verwirrend mit allen Änderungen! –

+0

@AHL Ich habe die Antwort aktualisiert, um die Aktualisierungen zu Ihrer Frage zu reflektieren. –

2

Dies ist ein Problem mit Ihrer Homestead.yaml Datei in ~/.homestead Verzeichnis. Ich muss den Dateiinhalt sehen, um Ihnen mehr zu helfen.

Nachdem Sie den Einzugsstil korrigiert haben, um nur Leerzeichen zu verwenden, ist das andere Problem aufgetreten, weil Sie noch kein Paar (öffentlich und privat) von Schlüsseln generieren. Um dies zu tun:

mkdir -p ~/.ssh && cd ~/.ssh

ssh-keygen -b 2048 -t rsa -C "[email protected]"

können Sie lassen Sie die Standarddateinamen (id_rsa), das Kennwort eingeben und das gleiche Passwort wiederholen.

+0

danke - habe die yaml-Datei über – AHL

+0

hinzugefügt Ich habe die Antwort aktualisiert. – Lucas

+0

danke Lucas -> Ich gebe die Befehle durch meine GitShell unter Windows und löste das Problem. Neues Problem bearbeitet oben – AHL

Verwandte Themen