1

我正在尝试在 OSX 上设置 Vagrant 来管理我的虚拟机。我已按照网站上的说明进行操作,但是当我进入“vagrant up”时,我得到以下输出(它会设置 VM,但随后会自动销毁它) - 这与 Vagrant/Virtual Box 版本有关吗?:

NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:26.
NOTE: Gem::SourceIndex#latest_specs is deprecated, use Specification.latest_specs. It will be removed on or after 2011-11-01.
Gem::SourceIndex#latest_specs called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:32.
NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /Library/Ruby/Site/1.8/rubygems/source_index.rb:142.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem::GemPathSearcher#initialize is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::GemPathSearcher#initialize called from /Library/Ruby/Site/1.8/rubygems.rb:928.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/plugin.rb:33.
[default] Importing base box 'lucid32'...
[default] Matching MAC address for NAT networking...
[default] Running any VM customizations...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- ssh: 22 => 2222 (adapter 1)
[default] Destroying VM and associated drives...
/Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/implementer/ffi.rb:306:in `call': can't modify frozen string (TypeError)
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/implementer/ffi.rb:306:in `string_to_utf16'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/implementer/ffi.rb:175:in `single_type_to_arg'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/implementer/ffi.rb:131:in `spec_to_args'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/util.rb:18:in `inject'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/implementer/ffi.rb:130:in `each'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/implementer/ffi.rb:130:in `inject'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/implementer/ffi.rb:130:in `spec_to_args'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/implementer/ffi.rb:65:in `call_vtbl_function'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/implementer/ffi.rb:50:in `call_function'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/abstract_interface.rb:134:in `call_function'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/com/abstract_interface.rb:51:in `add_redirect'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_forwarded_port.rb:142:in `save'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_engine.rb:67:in `modify_engine'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/network_adapter.rb:162:in `modify_adapter'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/vm.rb:397:in `with_open_session'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/network_adapter.rb:160:in `modify_adapter'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_engine.rb:66:in `modify_engine'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_forwarded_port.rb:141:in `save'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_forwarded_port.rb:112:in `save_relationship'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_forwarded_port.rb:111:in `each'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_forwarded_port.rb:111:in `save_relationship'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:226:in `save_relationship'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:212:in `save_relationships'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:210:in `collect'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:210:in `save_relationships'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_engine.rb:60:in `save'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_engine.rb:67:in `modify_engine'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/network_adapter.rb:162:in `modify_adapter'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/vm.rb:397:in `with_open_session'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/network_adapter.rb:160:in `modify_adapter'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_engine.rb:66:in `modify_engine'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_engine.rb:58:in `save'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/nat_engine.rb:34:in `save_relationship'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:226:in `save_relationship'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:212:in `save_relationships'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:210:in `collect'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:210:in `save_relationships'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/network_adapter.rb:137:in `save'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/network_adapter.rb:162:in `modify_adapter'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/vm.rb:397:in `with_open_session'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/network_adapter.rb:160:in `modify_adapter'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/network_adapter.rb:134:in `save'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/network_adapter.rb:89:in `save_relationship'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/network_adapter.rb:88:in `each'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/network_adapter.rb:88:in `save_relationship'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:226:in `save_relationship'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:212:in `save_relationships'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:210:in `collect'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/abstract_model/relatable.rb:210:in `save_relationships'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/vm.rb:340:in `save'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/vm.rb:397:in `with_open_session'
    from /Library/Ruby/Gems/1.8/gems/virtualbox-0.8.4/lib/virtualbox/vm.rb:328:in `save'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/vm/forward_ports.rb:114:in `forward_ports'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/vm/forward_ports.rb:86:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/vm/clear_forwarded_ports.rb:17:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/vm/customize.rb:16:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/vm/clean_machine_folder.rb:17:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/vm/check_guest_additions.rb:25:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/vm/match_mac_address.rb:16:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/vm/import.rb:21:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/vm/check_box.rb:23:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action/builder.rb:120:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action.rb:131:in `run'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/action.rb:131:in `run'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/vm.rb:137:in `up'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/command/up.rb:13:in `execute'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/command/up.rb:8:in `each'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/command/up.rb:8:in `execute'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/config.rb:115:in `map'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/core_ext/ordered_hash.rb:73:in `each'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:109:in `send'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:109:in `invoke'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/lib/vagrant/cli.rb:45:in `up'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.4/bin/vagrant:15
    from /usr/bin/vagrant:19:in `load'
    from /usr/bin/vagrant:19
4

1 回答 1

3

警告来自最新版本的 ruby​​gems,vagrant 需要它。您可以通过运行此答案中的命令来消除警告:

如何修复 Rubygems 最近的弃用警告?

此外,关于 Vagrant 0.7.5 的主要警告SourceIndex和所有已修复的警告。

所以如果你gem pristine --all除了升级 Vagrant 之外还运行,你所有的弃用都会消失!

于 2011-05-17T19:10:23.763 回答