http://www.douban.com/note/311599602/
在配置环境变量时找不到.bash_profile文件,请执行以下命令。
1. 启动终端Terminal
2. 进入当前用户的home目录
输入cd ~
3. 创建.bash_profile
输入touch .bash_profile
4. 编辑.bash_profile文件
输入open -e .bash_profile
我是为了配置pkg-config,输入pkg-config所在目录:export PATH=/opt/pkgconfig/bin/:$PATH
5. 保存文件,关闭.bash_profile
6. 更新刚配置的环境变量
输入source .bash_profile
7. 验证配置是否成功
输入pkg-config启动,已经不会报命令不存在了,表明已经配置好了
原文:http://www.cnblogs.com/kiwihere/p/4895514.html