【发布时间】:2017-07-11 05:57:48
【问题描述】:
Windows 10。
运行vagrant up时,出现以下错误:
==> centos: Destroying VM and associated drives...
C:/Users/hi/.vagrant.d/gems/2.2.5/gems/daemons-1.2.4/lib/daemons/daemonize.rb:10:in `fork': fork() function is unimplemented on this machine (NotImplementedError)
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/daemons-1.2.4/lib/daemons/daemonize.rb:10:in `safefork'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/daemons-1.2.4/lib/daemons/daemonize.rb:45:in `call_as_daemon'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/daemons-1.2.4/lib/daemons/application.rb:270:in `start_proc'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/daemons-1.2.4/lib/daemons/application.rb:296:in `start'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/daemons-1.2.4/lib/daemons/controller.rb:56:in `run'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/daemons-1.2.4/lib/daemons.rb:197:in `block in run_proc'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/daemons-1.2.4/lib/daemons/cmdline.rb:92:in `call'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/daemons-1.2.4/lib/daemons/cmdline.rb:92:in `catch_exceptions'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/daemons-1.2.4/lib/daemons.rb:196:in `run_proc'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/vagrant-dns-1.1.0/lib/vagrant-dns/service.rb:26:in `run!'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/vagrant-dns-1.1.0/lib/vagrant-dns/service.rb:17:in `start!'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/vagrant-dns-1.1.0/lib/vagrant-dns/service.rb:52:in `restart!'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/vagrant-dns-1.1.0/lib/vagrant-dns/restart_middleware.rb:14:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/plugins/providers/virtualbox/action/check_guest_additions.rb:49:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/vagrant-vbguest-0.13.0/lib/vagrant-vbguest/middleware.rb:31:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/Users/hi/.vagrant.d/gems/2.2.5/gems/vagrant-proxyconf-1.5.2/lib/vagrant-proxyconf/action/only_once.rb:33:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/plugins/providers/virtualbox/action/customize.rb:40:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/builtin/wait_for_communicator.rb:71:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.2/plugins/providers/virtualbox/action/customize.rb:40:in `call'
我试图从 GitHub 问题中找到一些解决方案: https://github.com/vagrant-landrush/landrush/issues/16
不知道。
也试过安装这个:
gem install win32-process
同样的结果。
所以我不知道真正的问题。
【问题讨论】:
-
我有点困惑,你是想从 Windows 运行这段代码吗?因为我很确定
fork在 Windows 上不起作用,这就是您收到此错误的原因。 -
@Thermatix 所以流浪汉不能在 Windows 上正常工作?
-
不,应该没问题,因为我之前在 windows 上使用过,您可能需要进行不同的配置。
-
@Thermatix 我不记得有配置的东西。只是现在不知道如何解决。
-
我看到你安装了
vagrant-dns插件,其他一些人报告说卸载它可以解决问题。