首页 > 解决方案 > Vagrant 不提供堆栈

问题描述

当我运行vagrant up以下显示错误时:

vagrant up
/Users/sui6526/.vagrant.d/gems/2.4.4/gems/rubyhacks-0.1.5/lib/rubyhacks.rb:536: warning: constant ::Fixnum is deprecated
Bringing machine 'srvub01' up with 'virtualbox' provider...
Bringing machine 'srvubu02' up with 'virtualbox' provider...
Bringing machine 'srvubu03' up with 'virtualbox' provider...
==> srvub01: Importing base box 'ubuntu/bionic64'...
==> srvub01: Matching MAC address for NAT networking...
==> srvub01: Checking if box 'ubuntu/bionic64' version '20190126.0.0' is up to date...
==> srvub01: Setting the name of the VM: ContainerWeek_srvub01_1555943344899_21275
==> srvub01: Clearing any previously set network interfaces...
==> srvub01: Preparing network interfaces based on configuration...
    srvub01: Adapter 1: nat
    srvub01: Adapter 2: hostonly
==> srvub01: Forwarding ports...
    srvub01: 22 (guest) => 2222 (host) (adapter 1)
==> srvub01: Running 'pre-boot' VM customizations...
==> srvub01: Booting VM...
==> srvub01: Waiting for machine to boot. This may take a few minutes...
==> srvub01: Forcing shutdown of VM...
==> srvub01: Destroying VM and associated drives...
/opt/vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:70:in `block in <class:Response>': undefined method `downcase' for nil:NilClass (NoMethodError)
    from /opt/vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:68:in `each'
    from /opt/vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:68:in `inject'
    from /opt/vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:68:in `<class:Response>'
    from /opt/vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:16:in `<module:SFTP>'
    from /opt/vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:3:in `<module:Net>'
    from /opt/vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/response.rb:3:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/request.rb:2:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp/session.rb:5:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/gems/2.2.4/gems/net-sftp-2.1.2/lib/net/sftp.rb:2:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/communicators/ssh/communicator.rb:12:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/communicators/ssh/plugin.rb:14:in `block in <class:Plugin>'
    from /opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/registry.rb:27:in `get'
    from /opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:259:in `communicate'
    from /opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'

我使用 MacOS 并运行 Vagrant 2.2.4,有人可以帮助我吗?我不是程序员,也不了解 Ruby。

标签: rubyvagrantvagrantfilevagrant-provision

解决方案


尝试通过以下方式解决此问题: vagrant plugin uninstall hostmanager

$ vagrant.exe plugin uninstall hostmanager
Uninstalling the 'hostmanager' plugin...
Removing hm
Successfully uninstalled hostmanager-1.2.2
Successfully uninstalled rubyhacks-0.1.5


推荐阅读