gpt4 book ai didi

php - 在 Ubuntu 上安装 Laravel/Homestead

转载 作者:行者123 更新时间:2023-12-04 19:02:04 25 4
gpt4 key购买 nike

在 Ubuntu 15.1 上安装 Laravel/Homestead 时,我无法正确映射路径以运行“vagrant up”,任何帮助将不胜感激。

 goldenos@GoldenOS:~/Homestead$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm: * The host path of the shared folder is missing:~/home/goldenos/Homestead/projects

这是我的 Homestead.yaml 文件的配置
   ---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
- ~/.ssh/id_rsa

folders:
- map: ~/home/goldenos/Homestead/projects
to: /home/vagrant/Code

sites:
- map: homestead.app
to: /home/goldenos/Homestead/projects

databases:
- homestead

# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar

# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp

最佳答案

据我所知~/home/username 的快捷方式在 Linux 中,要么删除 ~在您的路径中或删除 /home/username部分。

使用任一:

folders:
- map: ~/Homestead/projects
to: /home/vagrant/Code

或者
folders:
- map: /home/goldenos/Homestead/projects
to: /home/vagrant/Code

关于php - 在 Ubuntu 上安装 Laravel/Homestead,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37774034/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com