rbenv 和 MacPorts 的路径位置
我已经使用 python 几个月了我有 python 和通过 bash_login 中的 MacPorts 在 Mac 上安装 git @ export PATH="opt/local/bin:/opt/local/bin/mysql5/bin:/opt/local/ lib/postgresql90/bin:/usr/local/bin:/usr/local/sbin:$PATH"
今天我想尝试 ruby 所以我安装了 Rbenv & ruby 1.9.2-p290 通过 ruby-build。它在 bash_profile @ PATH="$HOME/.rbenv/bin:$PATH" 中创建了一个路径 eval "$(rbenv init -)"
当我在终端中 echo $PATH 时,我的路径现在设置为:/Users/demet8/.rbenv/shims:/Users/demet8/.rbenv/bin:/usr/bin:/ bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
我无法再使用我的 python/git/ 因为我的系统首先读取 Usr/local/ bash_profile(文件)。
问题:我需要先阅读 opt/local/ ,这样我仍然可以使用 python/git 。我应该消除创建的 bash_profile (文件)rbenv 吗?将 rbenv 的路径合并到我的 bash_login 路径中?
I have been using python for months & I have python & git installed on a Mac via MacPorts in bash_login @ export PATH="opt/local/bin:/opt/local/bin/mysql5/bin:/opt/local/lib/postgresql90/bin:/usr/local/bin:/usr/local/sbin:$PATH"
Today I wanted to try ruby so I installed Rbenv & ruby 1.9.2-p290 via ruby-build. It created a path in bash_profile @ PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
When I echo $PATH in the terminal my path is now set to:/Users/demet8/.rbenv/shims:/Users/demet8/.rbenv/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
I am no longer able to use my python/git/ because my system is reading Usr/local/ first in the bash_profile (file).
Question: I need opt/local/ to read first so I can still use python/git. Should I eliminate the bash_profile (file) rbenv created & consolidate rbenv's path into my bash_login path?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该合并 bash_profile 文件中的所有路径。 macports 路径和 rbenv 是不同的,可以放在一起而不会有顺序冲突。
我同时使用 Macports、Python 和 Rbenv &红宝石。
我的综合路径如下所示:
您可以这样:
You should consolidate all paths in your bash_profile file. The macports path and rbenv are distinct and can be pulled together without conflict of order.
I use both Macports, Python and Rbenv & Ruby.
My consolidated path looks like this:
You could have it like this: