在OSX设置PATH环境变量永久 [英] Setting PATH environmental variables in OSX permanently

查看:184
本文介绍了在OSX设置PATH环境变量永久的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了如何为permenantly OSX上设置环境变量几个答案,

I have read several answers on how to set environmental variables on OSX as permenantly,

首先,我试图在Linux这一点,如何永久设置$ PATH? 但我有一个错误信息说没有这样的文件和目录,所以我想我可以尝试〜/ .bash_profile中而不是〜/ .profile文件,但没有奏效。

First, I tried this, How to permanently set $PATH on Linux? but I had an error message saying no such file and directory, so I thought I could try ~/.bash_profile instead of ~/.profile but it did not work.

第二,我发现这个解决方案<一个href=\"http://stackoverflow.com/questions/460835/how-to-set-the-path-as-used-by-applications-in-os-x\">How设置$ PATH 13759在OS X中,该通知:做出改变。

Second, I found this solution How to set the $PATH as used by applications in os x , which advices to make changes in

〜/ .MacOSX / environment.plist

~/.MacOSX/environment.plist

但同样我不得不没有这样的文件和目录错误。

but again I had no such file and directory error.

我需要每个I打开一个新的终端会话时间的方式来设置这些变量,这样它将不要求重新设置并重新

I need a way to set these variables such that it won't require to set them again and again each time I open a new terminal session.

推荐答案

您必须将它添加到的/ etc /路径

参考(这为我的作品):<一href=\"http://architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/#.Uydjga1dXDg\">Here

Reference (which works for me) : Here

这篇关于在OSX设置PATH环境变量永久的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆