Vagrant没有安装Apache2也没有安装php

I just created a configuration file (it's a zip actually) for my vm on puphpet.com, downloaded the zip, extracted it. Then I run vagrant up in the folder where is located the vagrantfile. The vm is correctly setup under virtualbox, it runs well and the shared folders are working.

However when I access my vm from the host, using 127.0.0.1:7893 it displays : SSH-2.0-OpenSSH_6.0p1 Debian-4. Which is weired since I checked both install php and install apache on puphpet. I decided to verify their existance on the vm : which apache2, whereis php etc.

Nothing was returned.

So appearently php and apache2 have not been installed, even though the config.yaml file (that I created on puphpet) did specify to install both php and apache2.

At this point, I don't really know what to do (I'm new to php/vagrant/puphpet) :

  • should I install them myself on the vm with apt-get ?
  • ??

EDIT: during the installation process (vagrant up), I get errors like :

Err http://http.us.debian.org/debian/ wheezy/main linux-headers-3.2.0-4-amd64 am
d64 3.2.51-1
  404  Not Found [IP: 64.50.233.100 80]
Fetched 238 kB in 1s (167 kB/s)
Failed to fetch http://http.us.debian.org/debian/pool/main/l/linux/linux-headers
-3.2.0-4-common_3.2.51-1_amd64.deb  404  Not Found [IP: 64.50.233.100 80]

EDIT2: I 'solved' the problem by using a differents virtual machine.

I just ran the default config:

[01:26 PM]-[vagrant@packer-virtualbox]-[~]
$ php -v
PHP 5.5.10-1~dotdeb.1 (cli) (built: Mar  6 2014 18:55:59)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

Everything looks to be fine on my end.

A couple of things:

  • You can access the VM from your browser using the IP address you chose during initial config.
  • Looks like your main issue is that you couldn't connection to the Debian repos. Are you behind a firewall?

To try again, do:

$ vagrant destroy
$ rm -rf .vagrant
$ vagrant up

EDIT: during the installation process (vagrant up), I get errors like : ....

Check that you packages db in VM is up to date. just run

sudo apt-get update 

and then try again with apache2 and php installation.

I had the same problems when I opted for CentOS.
Where did the choosing Debian, the problems stopped occur.