簡體   English   中英

Composer codeIgniter“無需安裝或更新”,甚至可以將庫添加到composer JSON中

[英]Composer codeIgniter “nothing to install or update” even add library into composer JSON

很長一段時間我沒有使用codeIgniter作為我的框架。 我要在codeIgniter中使用composer安裝庫,

我要安裝的庫是hybridauth,用於使用codeigniter進行社交登錄。

我在我的composer.json文件中添加了"hybridauth/hybridauth": "~3.0"

這是我的整個composer.json

{
    "description": "The CodeIgniter framework",
    "name": "codeigniter/framework",
    "type": "project",
    "homepage": "https://codeigniter.com",
    "license": "MIT",
    "support": {
        "forum": "http://forum.codeigniter.com/",
        "wiki": "https://github.com/bcit-ci/CodeIgniter/wiki",
        "slack": "https://codeigniterchat.slack.com",
        "source": "https://github.com/bcit-ci/CodeIgniter"
    },
    "require": {
        "php": ">=5.3.7",
        "hybridauth/hybridauth": "~3.0"
    },
    "suggest": {
        "paragonie/random_compat": "Provides better randomness in PHP 5.x"
    },
    "require-dev": {
        "mikey179/vfsStream": "1.1.*",
        "phpunit/phpunit": "4.* || 5.*"
    }
}

然后,當我嘗試使用此命令composer install ,沒有任何安裝。 該命令的輸出如下:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in 
composer.json. You may be getting outdated dependencies. Run update to update 
them.
Nothing to install or update
Generating autoload files

當我嘗試composer update ,輸出如下所示:

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
    - The requested package hybridauth/hybridauth master is satisfiable by 
hybridauth/hybridauth[dev-master] but these conflict with your requirements 
or minimum-stability.

謝謝你的幫助。

您可以編輯

"hybridauth/hybridauth": "~3.0"

"hybridauth/hybridauth": "*"

然后,運行此命令composer update

它現在解決了我的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM