2015-09-04 120 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'是一种安全风险,可能会导致安装意外的宝石。要解决此警告,请使用块来指示哪些宝石应该来自次要来源。 –