在Ubuntu上安装Laravel时出错

时间:2016-12-14 08:41:27

标签: laravel ubuntu-16.04

我试图在opt / lampp / htdocs目录中安装laravel并收到此错误:

$ composer create-project --prefer-dist laravel/laravel blog
Installing laravel/laravel (v5.3.16)


[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>]

我正在使用Ubuntu 16.04

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

您需要使用sudo

sudo composer create-project --prefer-dist laravel/laravel blog