今天搭建服务时,在安装好composer后,项目下执行install时,报如下ERROR:
Do not run Composer as root/super user! See https://getcomposer.org/root for details
You are using Composer 1 which is deprecated. You should upgrade to Composer 2, see https://blog.packagist.com/deprecating-composer-1-support/Loading composer repositories with package information
Warning from https://mirrors.aliyun.com/composer: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Updating dependencies (including require-dev) [Composer\Downloader\TransportException] The "https://mirrors.aliyun.com/composer/p/provider-2017%248d3cdf6c9c766724349873e7c49f6a2c26950ea1094916feaf8075a0f802f502.json" file could not be downloaded (HTTP/1.1 404 Not Found)
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
网上搜索大部分都说用户权限的问题,这边也尝试了,最终还是不可以。最后的办法是采用切换源,我之前的阿里的把他切换腾讯源即可。
composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/