Set environment variables on Mac OS X Lion

后端 未结 16 1352
余生分开走
余生分开走 2020-11-22 11:01

When someone says \"edit your .plist file\" or \"your .profile\" or \".bash_profile\" etc, this just confuses me. I have no idea where these files are, how to create them if

16条回答
  •  故里飘歌
    2020-11-22 11:27

    Unfortunately none of these answers solved the specific problem I had.

    Here's a simple solution without having to mess with bash. In my case, it was getting gradle to work (for Android Studio).

    Btw, These steps relate to OSX (Mountain Lion 10.8.5)

    • Open up Terminal.
    • Run the following command:

      sudo nano /etc/paths (or sudo vim /etc/paths for vim)

      nano

    • Go to the bottom of the file, and enter the path you wish to add.
    • Hit control-x to quit.
    • Enter 'Y' to save the modified buffer.
    • Open a new terminal window then type:

      echo $PATH

    You should see the new path appended to the end of the PATH

    I got these details from this post:

    http://architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/#.UkED3rxPp3Q

    I hope that can help someone else

提交回复
热议问题