【问题标题】:Vagrant/Homestead Set up流浪者/宅基地设置
【发布时间】:2017-04-20 01:54:07
【问题描述】:

我正在 Ubuntu 16.04 上设置 Vagrant/Homestead。

我已经安装了 VirtualBox、Vagrant、Composer 和 PHP。

我从 git 仓库下载了 Homestead

git clone https://github.com/laravel/homestead.git宅基地

我 cd 进入 Homestead 目录

bash init.sh

收到消息 Homestead 已初始化!

但是当我导航到 cd .homestead 时,我收到一条错误消息,上面写着

bash: cd: .homestead: 没有这样的文件或目录

我也试过 cd ~/.homestead 仍然收到 bash: cd: .homestead: No such file or directory

关于如何解决此问题的任何想法?我提供了终端命令和每个命令的结果。

font@font-Linux:~$ cd web
font@font-Linux:~/web$ cd ..
font@font-Linux:~$ vagrant box add laravel/homestead
==> box: Loading metadata for box 'laravel/homestead'
    box: URL:removed the url for posting purposes
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.

1) hyperv
2) parallels
3) virtualbox
4) vmware_desktop

Enter your choice: 3
==> box: Adding box 'laravel/homestead' (v2.1.0) for provider: virtualbox
    box: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/2.1.0/providers/virtualbox.box
==> box: Successfully added box 'laravel/homestead' (v2.1.0) for 'virtualbox'!
font@font-Linux:~$ cd web
font@font-Linux:~/web$ git clone command removed the link for posting purposes //github.com/laravel/homestead.git Homestead
Cloning into 'Homestead'...
remote: Counting objects: 2184, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 2184 (delta 0), reused 0 (delta 0), pack-reused 2180
Receiving objects: 100% (2184/2184), 383.40 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1266/1266), done.
Checking connectivity... done.
font@font-Linux:~/web$ cd Homestead
font@font-Linux:~/web/Homestead$ bash init.sh
Homestead initialized!
font@font-Linux:~/web/Homestead$ cd ..
font@font-Linux:~/web$ cd ..
font@font-Linux:~$ cd .homestead
bash: cd: .homestead: No such file or directory
font@font-Linux:~$ cd ~/Homestead
bash: cd: /home/font/Homestead: No such file or directory

【问题讨论】:

  • errr.. 你什么..? git clone..?不,the Homestead Documentation 明确指出您将需要几个软件。请注意,Vagrant 是一种用于在单个工作流中构建和管理虚拟机环境的工具。凭借易于使用的工作流程和对自动化的关注,Vagrant 缩短了开发环境的设置时间,提高了生产平价性,并使“在我的机器上工作”成为过去的借口。 如其介绍页面所述..
  • 我更新了我的问题。我已经安装了 VirtualBox、Vagrant、Composer 和 PHP。

标签: laravel vagrant homestead


【解决方案1】:

最新版本的 Homestead 要求 homestead.yaml 位于您在克隆 repo 时创建的 ~/Homestead 目录中。 您不需要“.homestead”文件夹。

在您的情况下,您在 ~/web/Homestead 中创建了它。 所以,cd 到 ~/web/Homestead 并 vagrant up。

【讨论】:

  • 是的。谢谢!
【解决方案2】:

现在,Homestead 版本创建了 Homestead(H 大写) 文件夹,你需要 cd ~/Homesteadvagrant up

【讨论】:

  • 我也尝试过使用大写 H,但仍然没有运气。提供了我的终端命令。
  • 你现在可以流浪了吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-17
相关资源
最近更新 更多