安装Vagrant出错 安装Homestead出错失败

本文介绍了解决Vagrant及Homestead安装过程中遇到的问题,包括如何正确配置文件夹映射,在虚拟机中登录及执行命令的方法,并提供了关闭虚拟机的具体步骤。

安装Vagrant出错 安装Homestead出错

 

 

我们也可以在电脑上创建其它文件夹,只需保证创建的文件夹路径跟 Homestead.yaml 文件中的 folders - map 保持一致即可。

成功启动后,通过 SSH 来登录 Homestead

> vagrant ssh
							

在我们登录成功后,你能看到类似于如下图的界面,现在我们在该终端界面中输入的所有命令都将运行在 Homestead 虚拟机上。

最后尝试关闭 Homestead

> vagrant halt

 

 

 

I use Windows 10 and Git. I have created a VBox with command: vagrant box add laravel/homestead homestead up homestead ssh inside of: vagrant@homestead: I want to execute this command: vagrant provision but I receive this message:

"The program 'vagrant' is currently not installed. You can install it by typing: sudo apt-get install vagrant"

 

$ vagrant ssh

Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-38-generic x86_64)

 

* Documentation: https://help.ubuntu.com

* Management: https://landscape.canonical.com

* Support: https://ubuntu.com/advantage

 

234 packages can be updated.

101 updates are security updates.

 

 

Last login: Fri Apr 28 02:50:17 2017 from 10.0.2.2

vagrant@homestead:~$ vagrant halt

The program 'vagrant' is currently not installed. You can install it by typing:

sudo apt install vagrant

 

 

The problem is that you are trying to use vagrant inside the virtual machine (after did ssh) and of coruse you do not have it installed in the virtual machine. Just go oaut of the virtual machin (exit) and in the Windows command prompt run vagrant provision (of course located in the homestead folder). Hope it helps. Bets wishes.

意思就是说:vagrant halt 执行时,执行的窗口不是虚拟机,而是cmd窗口中。

转载于:https://www.cnblogs.com/lovebing/p/6802001.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值