まず、mavericksにしたら、macportsがDarwinのバージョンが違うぞこら!とかいいだして、portコマンドすら通らない状況に。(ここでXcodeCLT入れてなかったからかな?)
ちまちまFixするのも面倒なので、macportsも入れえ。
- Uninstall Macports
ここから、消し消しする。ちょっとかかる。
これをやっちまったので、zshすらなくなる事態にw久々のterminalを触ると、iterm2+oh-my-zshがいかに便利か実感するww
iterm2かterminalのpreferencesから、立ち上げるシェルを/usr/bash
に書き換え。
- Install Xcode
- Install Command line tools
学内LANのせいか、Command line toolsを見つけるときに、エラー。
Can't install the software because it is not currently available from the Software Update server.
なんだと?!
ってことで、マックのデベロッパーサイト からダウンロード。インスコ。
- Install Macports
本体は、すんなりインスコ完了。
するときには、LAN内のセッティング(LAN内からのMacports selfupdate)を忘れずに、アップデート
sudo port -d sync
が通らない。
~$ sudo port -d sync
Password:
DEBUG: Copying /Users/hoge/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences
---> Updating the ports tree
Synchronizing local ports tree from http://www.macports.org/files/ports.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 320 100 320 0 0 1130 0 --:--:-- --:--:-- --:--:-- 1134
100 25.8M 100 25.8M 0 0 435k 0 0:01:00 0:01:00 --:--:-- 450k
Error: Extracting http://www.macports.org/files/ports.tar.gz failed (can't read "verboseflag": no such variable)
DEBUG: Synchronization of 1 source(s) failed
while executing
"mportsync [array get global_options]"
port sync failed: Synchronization of 1 source(s) failed
なんですと。とりまエラー文(ERROR:以降の一行)でググる。
ここにあるように、macportsのtclファイルを書き換えに行く。
sudo find /opt/local/* | grep macports.tcl
とかで、ファイルの場所探して、そこへ移動(私の場合 /opt/local/libexec/macports/lib/macports1.0/
にありました)
sudo cp macports.tcl macports.tcl.bak
sudo vi macports.tcl
とかして、下記のように書き換える。
--- macports.tcl.bak 2014-05-26 12:08:25.000000000 +0200
+++ macports.tcl 2014-05-26 12:20:42.000000000 +0200
@@ -2496,6 +2496,8 @@
if {$macports::portverbose eq {yes}} {
set progressflag "--progress builtin"
+ set verboseflag "-v"
} elseif {[info exists macports::ui_options(progress_download)]} {
set progressflag "--progress ${macports::ui_options(progress_download)}"
+ set verboseflag ""
}
ちなみに、viのジャンプは ESC+2496G
とかでいけます。
蛇足ですが、私は、vimのセッティングで、readonlyに書き込めないとか言われたので、
sudo chmod a+w macports.tcl
sudo vim macports.tcl
sudo chmod a-w macports.tcl
とかして凌ぎました。
やっとこさ、インストール出来る環境が整いました。とりまzsh入れよ。