2012年5月5日土曜日

macports更新とhomebrewインストール

Macports と homebrew

■概要


構築場所→Mac OS X Lion 10.7.3


■mac ports をアップデート


sudo port selfupdate


↑のコマンドを実行したんだけど、エラーがでるので


downloads for apple developer


↑でCommand Line Tools for Xcodeってのをダウンロードしてインストールしたら
mac ports 関連のがはいってて




sudo port selfupdate
sudo port sync


できました。

■homebrewのインストール

1. 古いXcodeのアンインストール
Xcode3系が入っていたので、アンインストールする。

$ sudo /Developer/Library/uninstall-devtools --mode=all


2.  新しいXcodeをインストール
downloads for apple developer
ダウンロードしてきて
/Applications/Xcode.app
を実行してインストールする。

3. homebrewをインストール
上記のgithubに記述されているように下記のコマンドをターミナルで叩く


/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"


4. homebrewがちゃんとインストールされているかチェック


$ brew doctor
Error: /Library/Frameworks/Mono.framework detected
This can be picked up by CMake's build system and likely cause the build to
fail. You may need to move this file out of the way to compile CMake. 
→ とりえあず、Mono.frameworkでぐぐる
http://www.mono-project.com/Mono:OSX
ここに書いてる


#!/bin/sh -x

#This script removes Mono from an OS X System.  It must be run as root

rm -r /Library/Frameworks/Mono.framework

rm -r /Library/Receipts/MonoFramework-*

for dir in /usr/bin /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man5; do
   (cd ${dir};
    for i in `ls -al | grep /Library/Frameworks/Mono.framework/ | awk '{print $9}'`; do
      rm ${i}
    done);
done
これを ~/bin/ に
vim uninstall_mono_mac.sh に書いて実行して消してみる


Error: You have Macports or Fink installed.
This can cause trouble. You don't have to uninstall them, but you may like to
try temporarily moving them away, eg. 
sudo mv /opt/local ~/macports 
→ sudo mv /opt/loacal ~/macportsを実行しろっていってる見たいなので実行


Error: Your pkg-config is not checking "/usr/X11/lib/pkgconfig" for packages.
Earlier versions of the pkg-config formula did not add this path
to the search path, which means that other formula may not be able
to find certain dependencies.


To resolve this issue, re-brew pkg-config with:
  brew rm pkg-config && brew install pkg-config
Error: You have a non-brew 'pkg-config' in your PATH:
  /opt/local/bin/pkg-config


`./configure` may have problems finding brew-installed packages using
this other pkg-config.
→ここはわからないけど、Mono消したらなくなった。


Error: Your Xcode is configured with an invalid path.
You should change it to the correct path. Please note that there is no correct
path at this time if you have *only* installed the Command Line Tools for Xcode.
If your Xcode is pre-4.3 or you installed the whole of Xcode 4.3 then one of
these is (probably) what you want:


    sudo xcode-select -switch /Developer
    sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer


DO NOT SET / OR EVERYTHING BREAKS!


→ ここは二つのsudoのコマンドをそのまま実行で消えた




yanap@~$brew doctor
Your system is raring to brew. → このメッセージがでたらパッケージをインストールできる状態みたいです。

0 件のコメント:

コメントを投稿