douxi3977 2014-03-10 11:12
浏览 85

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.

  • 写回答

3条回答 默认 最新

  • dslijian2015 2014-03-10 13:28
    关注

    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
    
    评论

报告相同问题?

悬赏问题

  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码