使用Composer給laravel5安裝SimpleQrCode擴展包中問題詳解

命令:composer require simplesoftwareio/simple-qrcode 1.3.*

  完整的錯誤提示:./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.


  Problem 1
    - 2amigos/yii2-qrcode-helper 1.0.0 requires yiisoft/yii2 * -> satisfiable by
 yiisoft/yii2[2.0.0, 2.0.1, 2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.12.1
, 2.0.12.2, 2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2, 2.
0.15, 2.0.15.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9].
    - 2amigos/yii2-qrcode-helper 1.0.1 requires yiisoft/yii2 * -> satisfiable by
 yiisoft/yii2[2.0.0, 2.0.1, 2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.12.1
, 2.0.12.2, 2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2, 2.
0.15, 2.0.15.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9].
    - 2amigos/yii2-qrcode-helper 1.0.2 requires yiisoft/yii2 * -> satisfiable by
 yiisoft/yii2[2.0.0, 2.0.1, 2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.12.1
, 2.0.12.2, 2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2, 2.
0.15, 2.0.15.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9].
    - 2amigos/yii2-qrcode-helper 1.0.3 requires yiisoft/yii2 * -> satisfiable by
 yiisoft/yii2[2.0.0, 2.0.1, 2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.12.1
, 2.0.12.2, 2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2, 2.
0.15, 2.0.15.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9].
    - yiisoft/yii2 2.0.9 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable
 | 1.11.*@stable | 1.12.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable
 | 1.11.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable
 | 1.11.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl
e -> no matching package found.
    - yiisoft/yii2 2.0.5 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl
e -> no matching package found.
    - yiisoft/yii2 2.0.4 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl
e -> no matching package found.
    - yiisoft/yii2 2.0.3 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl
e -> no matching package found.
    - yiisoft/yii2 2.0.2 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl
e -> no matching package found.
    - yiisoft/yii2 2.0.15.1 requires bower-asset/jquery 3.2.*@stable | 3.1.*@sta
ble | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching
 package found.
    - yiisoft/yii2 2.0.15 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stabl
e | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching p
ackage found.
    - yiisoft/yii2 2.0.14.2 requires bower-asset/jquery 3.2.*@stable | 3.1.*@sta
ble | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching
 package found.
    - yiisoft/yii2 2.0.14.1 requires bower-asset/jquery 3.2.*@stable | 3.1.*@sta
ble | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching
 package found.
    - yiisoft/yii2 2.0.14 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stabl
e | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching p
ackage found.
    - yiisoft/yii2 2.0.13.3 requires bower-asset/jquery 3.2.*@stable | 3.1.*@sta
ble | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching
 package found.
    - yiisoft/yii2 2.0.13.2 requires bower-asset/jquery 3.2.*@stable | 3.1.*@sta
ble | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching
 package found.
    - yiisoft/yii2 2.0.13.1 requires bower-asset/jquery 3.2.*@stable | 3.1.*@sta
ble | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching
 package found.
    - yiisoft/yii2 2.0.13 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stabl
e | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching p
ackage found.
    - yiisoft/yii2 2.0.12.2 requires bower-asset/jquery 2.2.*@stable | 2.1.*@sta
ble | 1.11.*@stable | 1.12.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.12.1 requires bower-asset/jquery 2.2.*@stable | 2.1.*@sta
ble | 1.11.*@stable | 1.12.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.12 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stabl
e | 1.11.*@stable | 1.12.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.11.2 requires bower-asset/jquery 2.2.*@stable | 2.1.*@sta
ble | 1.11.*@stable | 1.12.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.11.1 requires bower-asset/jquery 2.2.*@stable | 2.1.*@sta
ble | 1.11.*@stable | 1.12.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.11 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stabl
e | 1.11.*@stable | 1.12.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.10 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stabl
e | 1.11.*@stable | 1.12.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.1 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl
e -> no matching package found.
    - yiisoft/yii2 2.0.0 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl
e -> no matching package found.
    - Installation request for 2amigos/yii2-qrcode-helper ~1.0 -> satisfiable by
 2amigos/yii2-qrcode-helper[1.0.0, 1.0.1, 1.0.2, 1.0.3].


Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your min
imum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more det
ails.
 - It's a private package and you forgot to add a custom repository to find it


Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further commo
n problems.


Installation failed, reverting ./composer.json to its original content.       

提示我的PHP 版本太高,不符合composer.json需要的版本,但是在PHP 下應該也是可以運行的,不管怎麼說,試着走起,composer可以設置忽略版本匹配,命令是:

          composer install --ignore-platform-reqs

發現還是不行,下一個修改版本:

     說是缺少  fxp/composer-asset-plugin插件:好,小姐姐就安裝插件,命令是:

          >composer global require "fxp/composer-asset-plugin
:^1.4.1"

在此又會發現一個新的問題:

Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+
on+KINGYEE234+2018-05-03+1336
to retrieve a token. It will be stored in "C:/Users/zhangfengxia/AppData/Roaming
/Composer/auth.json" for future use by Composer.

Token (hidden):

好,繼續戰鬥吧,那就生成token,這裏說的GitHub的授權祕鑰

進入 https://github.com/settings/tokens 點擊 「Generate new token」 新建一個 Token,選擇默認新建就行,然後就會得到一個 Token,然後輸入這個值就 OK 了。



點擊後到新的頁面之後,直接點擊按鈕,


這個時候你就看到token啦


好,這時候把token輸入進命令行後,在此輸入命令,


OK,大工告成!!!!





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章