2014-01-27 38 views
0

我在運行LAMP框中的規定時遇到問題。Vagrant Provision不起作用(已嘗試多次)

的流浪的版本:1.3.0

我創建了一個虛擬機跑了流浪漢。我得到一個超時錯誤,但虛擬機似乎已啓動並正在運行(流浪狀態顯示虛擬機的狀態)。

當我嘗試運行「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問題)。我刪除了一切,並嘗試命令行混帳,但無濟於事。

有人可以幫助解決這個問題。

更新:附流浪文件:

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

順便說一下,我無法檢查建議的編輯。那麼有人可以查看併發布此查詢。只是爲了澄清這一點不是在服務器端完成的(我試圖在客戶端設置虛擬機) –

+0

您可以添加完整的Vagrantfile或者可能包含所有文件的鏈接?這樣,我可以測試它,並深入到問題 – cocheese

+0

請找到附件vagrantfile內容: –

回答

0

看起來你應該改變根線在遊民文件指向你從PuPHPet得到了流浪漢文件的實際位置。

第一個錯誤表明它正在尋找/ vagrant下的shell目錄下的腳本,並且ROOT在您的vagrant文​​件中被設置爲/ vagrant。

/bin/bash: /vagrant/shell/os-detect.sh: No such file or directory