Php &引用;“拒绝许可”;“Laravel”的错误;新";命令,带着家园流浪
我正在用Ubuntu14使用Wagrant和Laravel Homestead 以下是我在运行laravel new时遇到的错误: 当我运行sudolaravelnew时,它会说Php &引用;“拒绝许可”;“Laravel”的错误;新";命令,带着家园流浪,php,laravel,ubuntu,vagrant,homestead,Php,Laravel,Ubuntu,Vagrant,Homestead,我正在用Ubuntu14使用Wagrant和Laravel Homestead 以下是我在运行laravel new时遇到的错误: 当我运行sudolaravelnew时,它会说 sudo: laravel: command not found 另外,是不是在Vagrant中安装了Ubuntu14而不是Ubuntu16 编辑(在kmasteryc评论之后): 谢谢,但是我也尝试了你的作曲家创建项目laravel/laravel项目,但是现在我遇到了这个错误 vagrant@homestead:
sudo: laravel: command not found
另外,是不是在Vagrant中安装了Ubuntu14而不是Ubuntu16
编辑(在kmasteryc评论之后):
谢谢,但是我也尝试了你的作曲家创建项目laravel/laravel项目
,但是现在我遇到了这个错误
vagrant@homestead:~/sites$ composer create-project laravel/laravel chatty
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Installing laravel/laravel (v5.2.31)
[ErrorException]
mkdir(): Permission denied
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]
那么,有没有办法在没有sudo的情况下运行这个命令
此外,这并不是将创建的项目同步到我的本地目录,在将chatty.dev映射到“chatty”文件夹(虚拟主机)然后运行vagrant provision
之后,我得到以下错误
harman@manchanda:~/web/Homestead$ vagrant provision
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: ~/web/sites/chatty
我的代码是正确的。但是,请同时查看此homestad.yaml
文件代码:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/web/sites/lv
to: /home/vagrant/sites/lv
- map: ~/web/sites/v8
to: /home/vagrant/sites/v8
- map: ~/web/sites/chatty
to: /home/vagrant/sites/chatty
sites:
- map: lv.app
to: /home/vagrant/sites/lv/public
- map: v8.app
to: /home/vagrant/sites/v8/public
- map: chatty.dev
to: /home/vagrant/sites/chatty/public
databases:
- homestead
- homestead_v8
- homestead_chatty
编辑编号2:
这是kmasteryc请求编辑后我的新Homestead.yaml
文件
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/web/sites/
to: /home/vagrant/sites/
# - map: ~/web/sites/lv
# to: /home/vagrant/sites/lv
# - map: ~/web/sites/v8
# to: /home/vagrant/sites/v8
# - map: ~/web/sites/chatty
# to: /home/vagrant/sites/chatty
sites:
- map: lv.app
to: /home/vagrant/sites/lv/public
- map: v8.app
to: /home/vagrant/sites/v8/public
# - map: chatty.dev
# to: /home/vagrant/sites/chatty/public
databases:
- homestead
- homestead_v8
# - homestead_chatty
特别提示:我现在已经评论了这个闲聊的东西
laravel new
现在正在运行(感谢sudo chmod 777-R站点
和sudo chown-R流浪者站点
),但问题仍然是流浪者没有同步文件夹。你用sudo composer安装了laravel安装程序吗?不,我通过添加流浪者框添加了laravel。。。。事实上,直到今天,它一直运转良好。。。我已经创建了另外两个实践项目也在流浪者盒。。。。但今天我正在创建一个新项目,并且。。。。繁荣事情并没有按照计划进行:(请注意,这两个项目是在Ubuntu14是vagrant box的最新版本时创建的…现在是Ubuntu16,我的最新版本中仍然有Ubuntu14…你可以尝试“composer创建项目laravel/laravel项目”而不是“laravel新项目”@KmasterYC-谢谢,但仍然有一个问题…编辑了我的问题…请看!
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/web/sites/lv
to: /home/vagrant/sites/lv
- map: ~/web/sites/v8
to: /home/vagrant/sites/v8
- map: ~/web/sites/chatty
to: /home/vagrant/sites/chatty
sites:
- map: lv.app
to: /home/vagrant/sites/lv/public
- map: v8.app
to: /home/vagrant/sites/v8/public
- map: chatty.dev
to: /home/vagrant/sites/chatty/public
databases:
- homestead
- homestead_v8
- homestead_chatty
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/web/sites/
to: /home/vagrant/sites/
# - map: ~/web/sites/lv
# to: /home/vagrant/sites/lv
# - map: ~/web/sites/v8
# to: /home/vagrant/sites/v8
# - map: ~/web/sites/chatty
# to: /home/vagrant/sites/chatty
sites:
- map: lv.app
to: /home/vagrant/sites/lv/public
- map: v8.app
to: /home/vagrant/sites/v8/public
# - map: chatty.dev
# to: /home/vagrant/sites/chatty/public
databases:
- homestead
- homestead_v8
# - homestead_chatty