LoginSignup
3
4

More than 5 years have passed since last update.

composer が古くて update に失敗

Last updated at Posted at 2015-08-22

環境

  • PHP (5.4.17)
  • Laravel (4.1.31)

目的

  • Webアプリを多言語化するため、家のPCに Translation Manager を入れようとしました。

    Laravelをインストールしたディレクトリ直下の composer.json に下記を追加。

        "require": {
        (その他のパッケージ),
        "barryvdh/laravel-translation-manager": "0.1.x"
        },
    

    コマンド実行。

    # compser update
    

エラー

  • 下記エラーが発生。

    [RuntimeException]
    Could not load package classpreloader/classpreloader in http://packagist.org: [UnexpectedValueException] Could not parse version constraint ^1.2.2: Invalid version string "^1.2.2"
    
    [UnexpectedValueException]                              
    Could not parse version constraint ^1.2.2: Invalid version string "^1.2.2"
    

対応

  • composer のバージョンが古くて "^1.2.2" という表記に未対応だったようです。

    下記を実行後、compser update を再実行したら正常にインストールできました。

    # /usr/local/bin/composer self-update
    

参考にしたページ

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4