0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Homebrewで古いバージョンをインストール

Last updated at Posted at 2016-03-23

参考:http://effectif.com/mac-os-x/installing-specific-version-of-homebrew-formula

carthageを例に書いています。

specify_version.sh
# formulaのディレクトリへ移動
$ cd /usr/local/Library/Formula/

# 一回怒られる
$ brew log carthage
Warning: The git repository is a shallow clone therefore the filtering may be incorrect.
Use `git fetch --unshallow` to get the full repository.

$ git fetch --unshallow
remote: Counting objects: 324024, done.
remote: Compressing objects: 100% (79532/79532), done.
remote: Total 324024 (delta 247862), reused 319162 (delta 243007), pack-reused 0
Receiving objects: 100% (324024/324024), 61.09 MiB | 207.00 KiB/s, done.
Resolving deltas: 100% (247862/247862), completed with 3307 local objects.
From https://github.com/Homebrew/homebrew
   470ea39..0e00db6  master     -> origin/master

# もう一回。欲しいバージョンのハッシュ値をコピー
$ brew log carthage

$ git checkout c6fa6777 carthage.rb
$ brew unlink carthage
$ brew install carthage

元の状態に戻す

fix_version.sh
$ cd /usr/local/Library/Formula/
$ git checkout master carthage.rb
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?