zoukankan      html  css  js  c++  java
  • yii2项目中运行composer 过程中遇到的问题

     问题1:

    Your requirements could not be resolved to an installable set of packages

    则表明 未安装fxp/composer-asset-plugin ;

    解决方法:控制台执行

    composer global require "fxp/composer-asset-plugin:~1.0.0"

    或尝试运行

    composer global require "fxp/composer-asset-plugin:~1.1.1"

     或尝试运行

    composer global require "fxp/composer-asset-plugin:1.2.0

     出现问题1也有可能PHP 7版本太高,不符合composer.json需要的版本,但是在PHP 7下应该也是可以运行的,composer可以设置忽略版本匹配,命令是:

    composer install --ignore-platform-reqs

    composer update --ignore-platform-reqs

    问题2:

    Could not fetch xxxx, please create a GitHub OAuth tokento go over the API rate limit
    
    Head to https://github.com/xxxxto retrieve a token. It will be stored in "C:/Users/xxx/AppData/Roaming/Composer/auth.json" for future use by Composer.
    
    Token (hidden):

    则表示需要你用github账号登陆后获取关键码 
    解决方法: 
    1.注册一个github账号,有更好,登陆后 
    2.打开 https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+localhost.localdomain+2015-11-30+1600 
    3.单击绿色的按钮:Generate token,复制关键码,粘贴在Token(hidden)后 ,粘贴后token不会显示出来,直接按回车尝试是否成功
    4.出现Token stored successfully.则成功,如果失败,看看改时间再生成一次,试试 

    问题3:

    执行问题1,问题2命令,以及以下命令尝试:

    composer update --no-plugins
  • 相关阅读:
    问题 G: 艰难取舍(dp)
    算式
    问题 G: 背菜谱
    问题 B: 寻路
    问题 D: 数字变换(dfs)
    问题 D: 2的幂数
    问题 C: 幸运数字II(4,7)
    问题 D: 莱布尼茨三角形
    问题 E: 有理数树
    2020年秋高级软件工程”领跑衫“获奖感言
  • 原文地址:https://www.cnblogs.com/-mrl/p/9019537.html
Copyright © 2011-2022 走看看