[OSX]MacPortsからHomebrewへの移行

Titanium Studioを3.0にしたところでportでインストールしたpythonが引っ掛かったので、このついでにパッケージ管理をHomebrewへ移行させました。

Homebrewのサイトはこちら

作業手順としては、
1.MacPortsをuninstallする
2.Homebrewをinstallする

下記はその作業記録です。

■MacPortsをuninstall

$port installed > 20130121_port_installed.txt ⇒MacPortsでインストールした内容を一応保存。。

$sudo port -f uninstall installed
$sudo rm -rf /opt/local/
$vi ~/.bash_profile
$vi _/.bashrc ⇒/opt/local関連のパスを削除する
$source ~/.bash_profile

■Homebrewをインストールする

・サイトのトップページの一番下に記載されています。
・/usr/local配下にインストールします。
$ ruby -e “$(curl -fsSkL raw.github.com/mxcl/homebrew/go)”
==> This script will install: /usr/local/bin/brew /usr/local/Library/… /usr/local/share/man/man1/brew.1
==> The following directories will be made group writable: /usr/local/. /usr/local/bin /usr/local/include /usr/local/lib /usr/local/lib/pkgconfig /usr/local/share /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/doc
==> The following directories will have their group set to admin: /usr/local/. /usr/local/bin /usr/local/include /usr/local/lib /usr/local/lib/pkgconfig /usr/local/share /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/doc Press ENTER to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin /usr/local/include /usr/local/lib /usr/local/lib/pkgconfig /usr/local/share /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/doc Password:
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/. /usr/local/bin /usr/local/include /usr/local/lib /usr/local/lib/pkgconfig /usr/local/share /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/doc
==> Downloading and Installing Homebrew… remote: Counting objects: 94473, done. remote: Compressing objects: 100% (41570/41570), done. remote: Total 94473 (delta 66194), reused 77535 (delta 52045) Receiving objects: 100% (94473/94473), 13.87 MiB | 334 KiB/s, done. Resolving deltas: 100% (66194/66194), done. From https://github.com/mxcl/homebrew * [new branch] master -> origin/master HEAD is now at 3e30f31 superenv: favor /opt/X11 over /usr/X11 when both exist Warning: Install the “Command Line Tools for Xcode”: http://connect.apple.com
==> Installation successful! You should run `brew doctor’ *before* you install anything. Now type: brew help

$ インストール状況のチェックを行います。

$ brew doctor Warning: Unbrewed dylibs were found in /usr/local/lib. If you didn’t put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted. Unexpected dylibs: /usr/local/lib/libmacfuse_i32.2.dylib /usr/local/lib/libmacfuse_i64.2.dylib /usr/local/lib/libMagick++.1.dylib /usr/local/lib/libMagickCore.1.dylib /usr/local/lib/libMagickWand.1.dylib /usr/local/lib/libosxfuse_i32.2.dylib /usr/local/lib/libosxfuse_i64.2.dylib Warning: Unbrewed .la files were found in /usr/local/lib. If you didn’t put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted. Unexpected .la files: /usr/local/lib/libMagick++.la /usr/local/lib/libMagickCore.la /usr/local/lib/libMagickWand.la /usr/local/lib/libosxfuse_i32.la /usr/local/lib/libosxfuse_i64.la Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig. If you didn’t put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted. Unexpected .pc files: /usr/local/lib/pkgconfig/ImageMagick++.pc /usr/local/lib/pkgconfig/ImageMagick.pc /usr/local/lib/pkgconfig/Magick++.pc /usr/local/lib/pkgconfig/MagickCore.pc /usr/local/lib/pkgconfig/MagickWand.pc /usr/local/lib/pkgconfig/osxfuse.pc /usr/local/lib/pkgconfig/Wand.pc Warning: Unbrewed static libraries were found in /usr/local/lib. If you didn’t put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted. Unexpected static libraries: /usr/local/lib/libMagick++.a /usr/local/lib/libMagickCore.a /usr/local/lib/libMagickWand.a Warning: Your compilers are different from the standard versions for your Xcode. If you have Xcode 4.3 or newer, you should install the Command Line Tools for Xcode from within Xcode’s Download preferences. Otherwise, you should reinstall Xcode.

$ Xcodeは既にインストールしているので、「Command Line Tools」を追加でインストールする

1.Xcodeを起動する
2.Preferencesを開く
3.Downloadを選択する
4.Command Line Toolsをインストールする 余分だって言われているライブラリなんかを退避させる

・pkgconfig ⇒ mv pkgconfig _pkgconfig
・その他は _libファイルを作成し、ソコへ移動させる

$ brew doctor Your system is raring to brew.
$ brew update Already up-to-date.
$ brew -v Homebrew 0.9.3

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です