ラベル mac の投稿を表示しています。 すべての投稿を表示
ラベル mac の投稿を表示しています。 すべての投稿を表示

2014年3月11日火曜日

Mac Port のselfupdate ができなかった時のメモ


長らく放置していたMac port.
Mac OS X も Mervericks にアップデートしたし,いい加減アップデートしないとなぁ,とselfupdate しようとすると…



$ sudo port selfupdate
---> Updating MacPorts base sources using rsync
MacPorts base version 2.1.2 installed,
MacPorts base version 2.2.1 downloaded.
---> Updating the ports tree
---> MacPorts base is outdated, installing new version 2.2.1
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl

Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed


などと,エラーがでてしまった.

これの解決は,以下のページを参考(というかそのまま)にしたらできた.
macportをアップデートしようとしたらエラーになった。 - @thorikiriのてょりっき

要は,xcode のコマンドラインツールが入ってなかったらしい.
Mac OS X をMervericks にアップデートするとインストールし直さないといけないんだったっけ?
以下の通りコマンドを叩くと,ポップアップが出てきて,コマンドラインツールをインストールするか否かを聞いてくる.
OKを押せばインストールしてくれる.



$ sudo xcode-select --install


で,再度selfupdate を実行してみると…



$ sudo port selfupdate
Password:
---> Updating MacPorts base sources using rsync
MacPorts base version 2.1.2 installed,
MacPorts base version 2.2.1 downloaded.
---> Updating the ports tree
---> MacPorts base is outdated, installing new version 2.2.1
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl


The ports tree has been updated. To upgrade your installed ports, you should run
port upgrade outdated
$ port version
Version: 2.2.1



とちゃんとMac port が2.2.1へアップデートされたっぽい.

余談だが,バージョンを確認するときは port --version ではないので注意.
port --version と叩くと,以下の様に怒られる.




$ port --version
Error: global does not accept --version
Usage: port
[-bcdfknopqRstuvy] [-D portdir] [-F cmdfile] action [privopts] [actionflags]
[[portname|pseudo-portname|port-url] [@version] [+-variant]... [option=value]...]...

"port help" or "man 1 port" for more information.





--
My Emacs Files At GitHub

2012年9月20日木曜日

MacにRVMをインストール


MacにRubyのバージョン管理プログラムであるRVMをインストールする.


実行環境






  • Mac OS X 10.7.4


  • GNU bash, version 3.2.48







RVMのインストール







$   bash < <(curl https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)




次にエディタで ~/.bash_profile を開き,文末に以下を追加する.
(私の場合は上記コマンドの実行により,既に追加されていた.)



[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*




.bash_profile 編集後



$ source ~/.bash_profile




を実行.
これで,RVMのインストールは完了する.
試しにRuby1.9.3をインストールしてみる.



$ rvm install 1.9.3
$ rvm list

rvm rubies

=* ruby-1.9.3-p194 [ x86_64 ]

# => - current
# =* - current && default
# * - default












--
My Emacs Files At GitHub