我想要安装laravel / homestead我完成了文档 在最后阶段我遇到了这个问题,这是我的代码。
➜ Homestead git:(master) ✗>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:410:in `initialize': Permission denied - /home/ubilli/.vagrant.d/data/lock.machine-action-0edeb9a5c0c9e5108f108257c012b604.lock (Errno::EACCES)
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:410:in `open'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:410:in `block in lock'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:434:in `lock'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:409:in `lock'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
➜ Homestead git:(master) ✗>sudo vagrant up
[sudo] password for ubilli:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'laravel/homestead' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'laravel/homestead' could not be found or
could not be accessed in the remote catalog. If this is a private
box on Vagrant Cloud, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://vagrantcloud.com/laravel/homestead"]
Error: Couldn't resolve host 'vagrantcloud.com'
➜ Homestead git:(master) ✗>sudo vagrant up
这是我的homestead.yaml文件,我该怎么做才能解决这个问题。
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: /home/ubilli/.ssh/id_rsa.pub
keys:
- /home/ubilli/.ssh/id_rsa
folders:
- map: /home/ubilli/laravel4app
to: /var/www/laravel
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
variables:
- key: APP_ENV
value: local
答案 0 :(得分:1)
我首先检查这个目录(/ home / ubilli)的权限,因为它似乎无法写入它:
许可被拒绝 - /home/ubilli/.vagrant.d /
在我自己的主目录已更改为root所有权的情况下发生了这种情况。尝试:
sudo chown -R ubilli:ubilli / home / ubilli /
将整个目录重置回用户帐户。 Vagrant需要写入该目录,因为这是将盒子文件下载到的位置。