概要 .bash_profileを作成したところ、MacPortsでインストールしたパッケージが見えなくなって困っていたのですが、ようやく解決しました。 直接の原因は.bash_profileを作成したことで.profileが読み込まれなくなり、それによってMacPortsがインストールしたパッケージへのPATHが反映されなくなったためです。 しかし、元を辿れば.profile・.bash_profile・.bashrcといったファイル群の依存関係を正しく理解していなかったことが原因です。また、これらの依存関係はUnix系OS全般に共通する振る舞いでもあるため、この機会に整理してみました。 検証環境 Mac OS X 10.6.8 GNU bash version 3.2.48(1)-release (x86_64-apple-darwin10.0) CentOS release 5.6