カテゴリー
ブログ 開発

開発 備忘録 Homebrewトラブル

[fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_text]

HomebrewがYosemiteアップデートで動作しなくなった。

Homebrewをアンインストールしたら、こんどは、Rubyが動かなくなり、メッセージを見ると、Homebrewを削除した際に、rubyの環境ファイルが一緒に消されたらしいことが判明。

そこで、下記の通り、rvmを再度インストールした。

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_code]$ rvm -v
-bash: rvm: command not found
$ curl -L https://get.rvm.io | bash -s stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 184 100 184 0 0 35 0 0:00:05 0:00:05 –:–:– 40
100 22760 100 22760 0 0 3698 0 0:00:06 0:00:06 –:–:– 38707
Downloading https://github.com/wayneeseguin/rvm/archive/1.26.7.tar.gz
Downloading https://github.com/wayneeseguin/rvm/releases/download/1.26.7/1.26.7.tar.gz.asc
Found PGP signature at: ‘https://github.com/wayneeseguin/rvm/releases/download/1.26.7/1.26.7.tar.gz.asc’,
but no GPG software exists to validate it, skipping.
Installing RVM to /Users/hideki/.rvm/
Adding rvm PATH line to /Users/hideki/.profile /Users/hideki/.mkshrc /Users/hideki/.bashrc /Users/hideki/.zshrc.
Adding rvm loading line to /Users/hideki/.profile /Users/hideki/.bash_profile /Users/hideki/.zlogin.
Installation of RVM in /Users/hideki/.rvm/ is almost complete:
* To start using RVM you need to run `source /Users/hideki/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
# hdkworks,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
* WARNING: You have ‘~/.profile’ file, you might want to load it,
to do that add the following line to ‘/Users/hideki/.bash_profile’:
source ~/.profile
$[/fusion_code][fusion_text]

Homebrewが動作可能になったので、さっそくUpdateとdoctoreを実行する

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_code]$ brew update
Already up-to-date.
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don’t worry and just ignore them. Thanks![/fusion_code][fusion_text]

doctorで出てきたワーニングにもとづき以下を実行する

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_code]$ brew prune
Pruned 0 dead formulae
Pruned 1185 symbolic links and 7 directories from /usr/local[/fusion_code][fusion_text]

他にもXcodeのバージョンが古いというメッセージが出ていたので、確認したところ、確かにVer5.X.Xで、古かった。そこで、Ver6.X.Xをインストールした。ついでに、Ver5を削除しようとしたが、削除方法が?だったのだが、結局、Ver6が上書きされた。

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_code]$ brew doctor
Your system is ready to brew.
$ [/fusion_code][fusion_text]

ということで、お疲れ様でした。Homebrewは、これで、ばっちり。

[/fusion_text][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]