2015-09-04 113 views
0

我已經在windows上安裝vagrant(1.7.4)和virtualbox(5.0.2),然後我下載了precise32.box並放入名爲vag_pre的文件夾中。在我進入這個命令行後:流浪了,它發生了警告。這裏是代碼:如何在win8上安裝vagrant插件

[email protected] E:\vag_pre 
$ vagrant box add base precise32.box 
==> box: Box file was not detected as metadata. Adding it directly... 
==> box: Adding box 'base' (v0) for provider: 
    box: Unpacking necessary files from: file://E:/vag_pre/precise32.box 
    box: Progress: 100% (Rate: 2588k/s, Estimated time remaining: --:--:--) 
==> box: Successfully added box 'base' (v0) for 'virtualbox'! 

[email protected] E:\vag_pre 
$ ls 
precise32.box 

[email protected] E:\vag_pre 
$ vagrant init 
A `Vagrantfile` has been placed in this directory. You are now 
ready to `vagrant up` your first virtual environment! Please read 
the comments in the Vagrantfile as well as documentation on 
`vagrantup.com` for more information on using Vagrant. 

[email protected] E:\vag_pre 
$ ls 
precise32.box Vagrantfile 

[email protected] E:\vag_pre 
$ vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Importing base box 'base'... 
==> default: Matching MAC address for NAT networking... 
==> default: Setting the name of the VM: vag_pre_default_1441356586862_57133 
==> default: Clearing any previously set network interfaces... 
==> default: Preparing network interfaces based on configuration... 
    default: Adapter 1: nat 
==> default: Forwarding ports... 
    default: 22 => 2222 (adapter 1) 
==> 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: Connection timeout. 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 of 
    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 the 
    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.2.0 
    default: VirtualBox Version: 5.0 
==> default: Mounting shared folders... 
    default: /vagrant => E:/vag_pre 

[email protected] E:\vag_pre 
$ vagrant plugin update vagrant-vbguest 
Updating plugins: vagrant-vbguest. This may take a few minutes... 
Bundler, the underlying system Vagrant uses to install plugins, 
reported an error. The error is shown below. These errors are usually 
caused by misconfigured plugin installations or transient network 
issues. The error from Bundler is: 

An error occurred while installing little-plugger (1.1.4), and Bundler cannot continue. 
Make sure that `gem install little-plugger -v '1.1.4'` succeeds before bundling. 

Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.Gem::RemoteFetcher::FetchError: Errno::ECONNRESET: An existing connection was forcibly closed by the remote host. - SSL_connect (https://rubygems.org/gems/little-plugger-1.1.4.gem) 

而且我不知道如何安裝gem在win8.1上,我應該先安裝ruby嗎?非常感謝

回答

1

要安裝新插件,您需要運行vagrant plugin install vagrant-vbguest

,因爲它似乎您遇到SSL連接到https://rubygems.org的問題,您應該添加以下參數:

vagrant plugin install vagrant-vbguest --plugin-source http://rubygems.org

+0

想想@研究E:\ vag_pre $流浪漢插件安裝無業遊民,vbguest 安裝'vagrant-vbguest'插件。這可能需要幾分鐘的時間... Bundler,Vagrant用於安裝插件的底層系統, 報告了錯誤。錯誤如下所示。這些錯誤通常是由配置錯誤的插件安裝或瞬態網絡 問題導致的 。來自Bundler的錯誤是: –

+0

對不起,它有點長, –

+0

安裝little-plugger(1.1.4)時發生錯誤,並且Bundler無法繼續。 確保在捆綁之前'gem install little-plugger -v'1.1.4''成功。 警告:此Gemfile包含多個主要來源。不使用區塊多次使用'source'是一種安全風險,可能會導致安裝意外的寶石。要解決此警告,請使用塊來指示哪些寶石應該來自次要來源。 –