2015-07-13 49 views
8

我在筆記本電腦上運行Windows 8.1 64位。Vagrant出現錯誤,改變/ vagrant的所有權:不是目錄

我一直在關注這個指南嘗試的建立宅基地爲我的Laravel項目:laravel installation and setup

指南tldr:你只需要安裝無業遊民,虛擬框和作曲家。你用這些來獲得宅基地,然後進行初始化和安裝。你配置你的homestead.yaml並生成ssh密鑰。在所有這些之後,你使用vagrant,以便讓你的Vritual機器配備你的開發環境和所有的東西。

使用git bash,我按照指南進入'vagrant up'部分。

這裏就是它得到毛茸茸的,我得到以下錯誤:

$ 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 
==> 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 => 8000 (adapter 1) 
    default: 443 => 44300 (adapter 1) 
    default: 3306 => 33060 (adapter 1) 
    default: 5432 => 54320 (adapter 1) 
    default: 22 => 2222 (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: Warning: Connection timeout. Retrying... 
    default: Warning: Remote connection disconnect. Retrying... 
    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! 
==> default: Checking for guest additions in VM... 
    default: The guest additions on this VM do not match the installed version o 
f 
    default: VirtualBox! In most cases this is fine, but in rare cases it can 
    default: prevent things such as shared folders from working properly. If you 
see 
    default: shared folder errors, please make sure the guest additions within t 
he 
    default: virtual machine match the version of VirtualBox you have installed 
on 
    default: your host and reload your VM. 
    default: 
    default: Guest Additions Version: 4.3.14 
    default: VirtualBox Version: 5.0 
==> default: Setting hostname... 
==> default: Configuring and enabling network interfaces... 
==> default: Mounting shared folders... 
    default: /vagrant => C:/Users/Work/Homestead/Homestead 
The following SSH command responded with a non-zero exit status. 
Vagrant assumes that this means the command failed! 

chown `id -u vagrant`:`id -g vagrant` /vagrant 

Stdout from the command: 

Stderr from the command: 

chown: changing ownership of ���/vagrant���: Not a directory 

我已經運行git bash作爲管理員。 我.yaml文件看起來像這樣

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

authorize: C:/Users/Work/.ssh/id_rsa.pub 

keys: 
    - C:/Users/Work/.ssh/id_rsa 

folders: 
    - map: C:/Users/Work/Projects 
     to: /home/vagrant/Code 

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

databases: 
    - homestead 

variables: 
    - key: APP_ENV 
     value: local 

我流浪漢,虛框的最新版本。

在我看來,似乎錯誤來自該文件夾路徑無效,但看到我的yaml文件應該是正確的,我不明白如何解決它。

我成功地在另一個Windows 8.1固定PC上安裝了宅基地環境,但我從未遇到過這個錯誤。

幫助深表感謝

+0

檢查這個錯誤此https://github.com/mitchellh/vagrant/issues/5933 –

+0

同樣的錯誤在這裏,這是一個相對較新的錯誤,應該在明天修復 –

回答

2

我剛剛完成了。

  • 所以你有Vagrant和最新的VirtualBox。
  • 現在
  • 重新啓動計算機,如果你沒有任何之後的安裝
  • 卸載VBOX 5.0
  • 再次重新啓動計算機
  • 下載的做到這一點,對AMD/86
  • 運行vagrant up安裝30年3月4日你瞧
+0

這實際上讓我通過了錯誤謝謝:) – Snoozles

0

不是100%肯定,但它似乎是,流浪漢正在試圖映射它的默認「/遊民」文件夾到你的本地C:/用戶/工作/泰德/宅基。如果本地不存在或存在某些權限錯誤,則不會創建/ vagrant,並且其上的下一個命令將失敗。看看是否創建了C:/ Users/Work/Homestead/Homestead。而且我也沒有看到你的yaml中的這個映射。/vagrant => C:/ Users/Work/Homestead/Homestead。你的配置不被某些東西覆蓋嗎?

1

所以,這裏是我如何設法修復它。

最新版本的Vagrant(1.3.5)和VirtualBox(4.3.4)在Windows上根本不能一起玩。所以,我保持了Vagrant 1.3.5並下到了VirtualBox 4.2.2。

一旦你有,你必須擺脫幾個文件夾,讓一切都正確重置本身:

Users\<<USERNAME>>\.VirtualBox 
Users\<<USERNAME>>\.vagrant.d 

試圖運行

vagrant up 

有了之前刪除這些,我是能夠讓一切再次運行。但是,我注意到,流浪漢的運行速度比以前慢了很多。儘管如此,我可以忍受。 非常感謝您的幫助和建議。

1

目前Vagrant(< = 1.7.3)在VirtualBox 5.0中存在一個bug。據

https://github.com/mitchellh/vagrant/issues/5933

流浪1.7.4將有VB 5.0的修復。它可以在樹中應用,就像我在Github上提到的那樣。

+1

當使用Vagrant 1.8.1&VirtualBox 5.0.0時,同樣的錯誤消息也會產生。我還沒有用現在可用的VirtualBox 5.0.10進行測試。 – gkephorus

+0

VirtualBox 5.0.18 r106667和Vagrant 1.8.1爲我工作 – Florian

0

如果您收到此消息,請嘗試匹配主機上的VirtualBox版本,這將解決問題。

默認值:此虛擬機上的guest虛擬機添加與安裝的版本 不匹配默認值:VirtualBox!在大多數情況下,這很好,但在極少數情況下,它可以默認爲 :防止諸如共享文件夾之類的操作正常工作。如果您看到默認: 默認:共享文件夾錯誤,請確保 默認的虛擬機與您在 上安裝的VirtualBox的版本默認相匹配:默認:您的主機並重新加載虛擬機。 默認: 默認:客戶添置版本:4.3.10 默認:VirtualBox的版本:5.0