Composer: how can I install another dependency without updating old ones?

問題:

I have a project with a few dependencies and I'd like to install another one, but I'd like to keep the others the way they are. 我有一個帶有一些依賴項目的項目,我想安裝另一個項目,但我想保持其他人的方式。 So I've edited the composer.json , but if I run composer install , I get the following output: 所以我編輯了composer.json ,但如果我運行composer install ,我會得到以下輸出:

Installing dependencies 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.
Your requirements could not be resolved to an installable set of packages.

Problem 1
    - laravel/framework dev-master requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework dev-master requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - Installation request for laravel/framework dev-master -> satisfiable by laravel/framework dev-master.

First of all, I do have mcrypt installed, so I don't know why it's complaining about that there. 首先,我確實安裝了mcrypt,所以我不知道它爲什麼會抱怨那裏。

So, how can I install this new dependency? 那麼,我該如何安裝這個新的依賴?

My composer.json: 我的composer.json:

{
    "require": {

        "opauth/opauth": "*",
        "opauth/facebook": "*",
        "opauth/google": "*",
        "opauth/twitter": "*",

        "imagine/Imagine": "dev-develop",

        "laravel/framework": "4.*",
        "loic-sharma/profiler": "dev-master"
    },
    "autoload": {
        "classmap": [
            "app/libraries",
            "app/commands",
            "app/controllers",
            "app/models",
            "app/database/migrations",
            "app/tests/TestCase.php"
        ]
    },
    "minimum-stability": "dev"
}

解決方案:

參考一: https://en.stackoom.com/question/11pQz
參考二: https://stackoom.com/question/11pQz
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章