composer 卸载和安装
composer 卸载和安装
如果是virtualbox安装的 就 进入虚拟机 把 /home/vagrant/.config 下面的 composer 删除掉
重新安装 composer.phar 分别复制的 /bin/composer 和 /usr/local/bin/composer
共享目录安装composer报错提示如下
安装的时候一定 不要在共享目录安装比如 /var/www/html
建议在根目录创建一个 myself ,项目移动到这个下面, 执行 composer
[vagrant@localhost html]$ composer create-project hyperf/hyperf-skeleton
Creating a "hyperf/hyperf-skeleton" project at "./hyperf-skeleton"
Installing hyperf/hyperf-skeleton (v2.1.2)
- Installing hyperf/hyperf-skeleton (v2.1.2): Extracting archive Install of hyperf/hyperf-skeleton failed
[RuntimeException] Could not delete /var/www/html/hyperf-skeleton:
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package>] [<directory>] [<version>]
[vagrant@localhost html]$ pwd
/var/www/html
[vagrant@localhost html]$
其他目录安装,可以正常安装
[vagrant@localhost myself]$ composer create-project hyperf/hyperf-skeleton
Creating a "hyperf/hyperf-skeleton" project at "./hyperf-skeleton"
Installing hyperf/hyperf-skeleton (v2.1.2)
- Installing hyperf/hyperf-skeleton (v2.1.2): Extracting archiveCreated project in /myself/hyperf-skeleton
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
> Installer\Script::install
Setting up optional packages
Setup data and cache dir
Removing installer development dependencies
What time zone do you want to setup ? [n] Default time zone for php.iniMake your selection or type a time zone name, like Asia/Shanghai (n):
^Z
[2]+ 已停止 composer create-project hyperf/hyperf-skeleton
[vagrant@localhost myself]$
[vagrant@localhost myself]$ pwd
/myself
[vagrant@localhost myself]$
compsoser降级升级
降一级
composer self-update --1
//升级
composer self-update
本作品采用《CC 协议》,转载必须注明作者和本文链接
推荐文章: