我在LAMP盒子上运行该规定时遇到问题。
Vagrant的版本:1.3.0
我已经创建了一个虚拟机并运行了Vagrant。我得到一个超时错误但VM似乎已启动并运行(vagrant status显示VM的状态)。
当我尝试运行“vagrant provision”时,我收到了以下错误。
$ vagrant provision
[default] Running provisioner: shell...
DL is deprecated, please use Fiddle
[default] Running: C:/Users/vjay/AppData/Local/Temp/vagrant-shell20140127-4496-wgoaz8
/bin/bash: /vagrant/shell/os-detect.sh: No such file or directory
/bin/bash: /vagrant/shell/os-detect.sh: No such file or directory
cat: /vagrant/shell/self-promotion.txt: No such file or directory
Created directory /.puphpet-stuff
[default] Running provisioner: shell...
[default] Running: C:/Users/vjay/AppData/Local/Temp/vagrant-shell20140127-4496-1mc5ktv
/bin/bash: /vagrant/shell/os-detect.sh: No such file or directory
/bin/bash: /vagrant/shell/os-detect.sh: No such file or directory
/bin/bash: /vagrant/shell/os-detect.sh: No such file or directory
[default] Running provisioner: shell...
[default] Running: C:/Users/vjay/AppData/Local/Temp/vagrant-shell20140127-4496-1beurlg
/bin/bash: /vagrant/shell/os-detect.sh: No such file or directory
/bin/bash: /vagrant/shell/os-detect.sh: No such file or directory
Installing git
Finished installing git
cp: Copied Puppetfile
cannot stat `/vagrant/puppet/Puppetfile': No such file or directory
Installing librarian-puppet
Finished installing librarian-puppet
Running initial librarian-puppet
/usr/lib/ruby/1.8/pathname.rb:770:in `read': No such file or directory - /etc/puppet/Puppetfile (Errno::ENOENT)
from /usr/lib/ruby/1.8/pathname.rb:770:in `read'
from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.10/vendor/librarian/lib/librarian/specfile.rb:14:in `read'
from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.10/vendor/librarian/lib/librarian/action/resolve.rb:12:in `run'
from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.10/vendor/librarian/lib/librarian/cli.rb:161:in `resolve!'
from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.10/lib/librarian/puppet/cli.rb:63:in `install'
from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:in `__send__'
from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.10/vendor/librarian/lib/librarian/cli.rb:29:in `bin!'
from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.10/bin/librarian-puppet:9
from /usr/bin/librarian-puppet:19:in `load'
from /usr/bin/librarian-puppet:19
Finished running initial librarian-puppet
[default] Running provisioner: puppet...
Shared folders that Puppet requires are missing on the virtual machine.
This is usually due to configuration changing after already booting the
machine. The fix is to run a `vagrant reload` so that the proper shared
folders will be prepared and mounted on the VM.
为了补充一点,我挖了几篇博客帖子,其中一篇帖子要求尝试命令行git实用程序(因为显然CRLF和LF存在问题)。我删除了所有内容并尝试了命令行git,但无济于事。
有人可以帮助您解决此问题。
更新:附加的Vagrant文件:
VAGRANTFILE_API_VERSION = "2"
BOX_NAME = "dct-lamp-local"
RELATIVE = '../..'
ROOT = '/vagrant'
load '../common.include'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder "#{RELATIVE}/www/", "/var/www/html", id: "apache", :nfs => false, :mount_options => ["uid=510,gid=510"]
config.vm.provider :virtualbox do |virtualbox|
virtualbox.customize ["modifyvm", :id, "--name", BOX_NAME]
virtualbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
virtualbox.customize ["modifyvm", :id, "--memory", "1024"]
virtualbox.customize ["setextradata", :id, "--VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end
config.vm.box = BOX_NAME
config.vm.hostname = "#{BOX_NAME}.local"
end
答案 0 :(得分:1)
看起来你应该改变vagrant文件中的ROOT行,指向你从PuPHPet获得的vagrant文件的实际位置。
第一个错误表明它正在/ vagrant下的shell目录中查找脚本,并且在您的vagrant文件中将ROOT设置为/ vagrant。
/bin/bash: /vagrant/shell/os-detect.sh: No such file or directory