LoginSignup
3
4

More than 5 years have passed since last update.

Homebrew のインストール

Last updated at Posted at 2017-03-26

1. rubyからcurlを実行してインストール

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

↑上記コマンドは、Homebrewの公式サイトにある。URL変わる場合もあるので確認すること。
https://brew.sh/index_ja.html

2. インストールできたか確認

brew doctor

で確認する。
「Your system is ready to brew.」と出ればOK

↓なんかwarning出た。。。

$ 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!

Warning: Python is installed at /Library/Frameworks/Python.framework               *1

Homebrew only supports building against the System-provided Python or a
brewed Python. In particular, Pythons installed to /Library can interfere
with other software installs.

Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
  2to3

Consider setting your PATH so that /usr/local/bin
occurs before /usr/bin. Here is a one-liner:
  echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile

(*1) 事前に、独自にPython3.xをインストーラで入れていたため、警告が出た。

↓なのでPythonいったん消す

参考URL

http://nwpct1.hatenablog.com/entry/2014/03/20/173740
↓からの
https://nsplat.wordpress.com/2013/06/09/python%E5%86%8D%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%97%E3%81%9F%E3%81%A3%E3%81%9F/
↓からの
http://blog.fkoji.com/2012/10022035.html

Python消す手順

①アプリケーションフォルダにある PythonX.X を削除

②/Library/Frameworks/Python.framework を削除

③/usr/local/bin にある /Library/Frameworks/Python.framework へのシンボリックリンクを削除

シンボリックリンクは以下のコマンドで確認できる。

ls /usr/local/bin | grep -i python

以下で削除できる。

cd /usr/local/bin
ls /usr/local/bin | grep -i python | xargs rm -f
brew prune
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