错误:无法找到Exec [download composer]的依赖包[php5-cli]

时间:2014-01-07 15:24:37

标签: virtual-machine virtualbox vagrant puppet

我正在尝试使用此Vagrant虚拟机部署Symfony2项目。当我尝试使用vagrant up命令运行环境并输出以下内容时出现问题:

$vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'debian-php-dev'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 80 => 8080 (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please make sure the guest additions within the
virtual machine match the version of VirtualBox you have installed on
your host and reload your VM.

Guest Additions Version: 4.2.10
VirtualBox Version: 4.3
[default] Setting hostname...
[default] Configuring and enabling network interfaces...
[default] Exporting NFS shared folders...
Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
[default] Mounting NFS shared folders...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet-1/manifests
[default] -- /tmp/vagrant-puppet-1/modules-0
[default] Running provisioner: puppet...
Running Puppet with site.pp...
stdin: is not a tty
Error: Could not find dependency Package[php5-cli] for Exec[download composer]
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

puppet apply --hiera_config /vagrant/config/hiera.yaml --modulepath '/tmp/vagrant-puppet-1/modules-0' --manifestdir /tmp/vagrant-puppet-1/manifests --detailed-exitcodes /tmp/vagrant-puppet-1/manifests/site.pp || [ $? -eq 2 ]

Stdout from the command:



Stderr from the command:

stdin: is not a tty
Error: Could not find dependency Package[php5-cli] for Exec[download composer]

1 个答案:

答案 0 :(得分:-1)

尝试添加:

  include php::cli

到第70行manifests / site.pp下面的include php::dev文件

错误非常自我解释 - 您选择使用的特定 Vagrant 设置中缺少the php5-cli包...添加它很容易,其他一切都应该有效。 ..只要没有其他模块或包丢失。