2016-03-20 4 views
2

Я следовал за уроком https://laravel.com/docs/5.0/homestead, и при запуске шага «vagrant up» появляется следующее сообщение об ошибке (ниже) Какие-нибудь идеи в чем проблема? Запуск последней версии Oracle VirtualBox и последней версии Vagrant. С уважениемVagrant Laravel Homestead - ошибка при запуске бродяги вверх

-

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> 

-

бродяга файл:

-

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 файл:

-

--- 
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

Ваш файл Homestead.yaml содержит «вкладки» вместо пробелов. –

+0

спасибо - кажется, что-то исправил. теперь я получаю еще одну ошибку. – AHL

ответ

5

issue you're experiencing с Homestead задокументирован в Github. Существует обходное решение, которое заключается в следующем:

Решение: Удалить тип: «nfs» в ваших папках Homestead.yaml.

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

«пользователей Windows:.. Папки NFS не работают на хостах Windows, Vagrant будет игнорировать ваш запрос для NFS синхронизированных папок Windows,


Оригинал ответа (для вопрос до его редактирования)

Теперь проблема связана с вашим ключом ssh, или отсутствует из.

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

Раздел in the guide you linked титулованных Установите Ваш SSH ключ имеет следующие инструкции, чтобы помочь вам создать одну (обрезается соответствующие инструкции для Windows):

Установите Ваш SSH ключ

[.. ,]

В Windows вы можете установить Git и использовать оболочку Git Bash, входящую в комплект поставки Git, чтобы выполнить команду выше. Кроме того, вы можете использовать PuTTY и PuTTYgen.

После того, как вы создали ключ SSH, укажите путь ключа в свойстве authorize вашего Homestead.yaml файла.

Если вам не нравится работать с командами, я бы рекомендовал использовать метод PuTTYgen.

+1

благодарит Брайана Мортона -> Я вывожу команды через мой GitShell на Windows и решил проблему. Новая проблема, отредактированная выше – AHL

+0

@AHL, вы могли бы уточнить, какова ваша текущая проблема? Исходный вопрос сейчас довольно запутанный со всеми изменениями! –

+0

@AHL Я обновил ответ, чтобы отразить обновления вашего вопроса. –

2

Это проблема с файлом Homestead.yaml в каталоге ~/.homestead. Мне нужно, чтобы содержимое файла помогло вам больше.

После того, как вы исправили стиль отступа, чтобы использовать только символы пробела, другая проблема возникла из-за того, что вы еще не создали пару (общедоступных и закрытых) ключей. Для этого:

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

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

Вы можете позволить имя файла по умолчанию (id_rsa), введите пароль и повторите тот же пароль.

+0

спасибо - добавили файл yaml выше – AHL

+0

Я обновил ответ. – Lucas

+0

спасибо Лукас -> Я вывожу команды через мой GitShell на Windows и решил проблему. Новая проблема отредактирована выше – AHL

Смежные вопросы