adding sth to the path

Discussion in 'Mac Programming' started by juhuu123, Jun 1, 2010.

  1. juhuu123 macrumors newbie

    Joined:
    Jun 1, 2010
    #1
    Dear all,
    I am a complete beginner in this field, but I need to know how I can successfully add sth to the path variable, that stays there and that works. I have downloaded a package (cufflinks) and untared it and two binaries (cufflinks and cuffcompare) from that I now have to add to the path variable. I tried it with

    export PATH=$PATH:/new_path_entry

    but that does not work. At least I do not get the cufflinks command to run. Can anyone help me, please? If you need further information, please tell me.

    Thanks a lot,
    juhuu
     
  2. petron macrumors member

    Joined:
    May 22, 2009
    Location:
    Malmo, Sweden
    #2
    Hi,

    I do not know much of the tool you are suppose to use but...
    Did you verified that the "/new_path_entry" is currently in the path ?

    run in terminal

    echo $PATH


    to see your path, it may be something else that prevent you from running the cufflinks.

    /petron
     
  3. pilotError macrumors 68020

    pilotError

    Joined:
    Apr 12, 2006
    Location:
    Long Island
    #3
    That will only work in the current window as long as new_path_entry contains the location of the binaries.

    We just went through this on This Thread
     
  4. juhuu123 thread starter macrumors newbie

    Joined:
    Jun 1, 2010
    #4
    thanks a lot for your help. I tried now various ways, how to add this "cufflinks" to my PATH, but it does not work. I also read the other thread, but I cannot find anything, that would help me now. Like I said, I do not know much about this. So here is a little history of what I did.

    in my account (no admin rights):

    export sudo export PATH=$PATH:/Users/juhuu/cufflinks/cufflinks-0.8.2.OSX_x86_64/cufflinks

    then it asked me for the password and afterwards it said, that the account is not in the sudoers file.

    so I changed to the admin acoound and I did the same and then it says

    sudo: export: command not found

    so does anyone know, where I do the mistakes?

    Thanks a lot
     
  5. pilotError macrumors 68020

    pilotError

    Joined:
    Apr 12, 2006
    Location:
    Long Island
    #5
    If you want to be try it out, open a terminal window and type

    export PATH=$PATH:/Users/juhuu/cufflinks/cufflinks-0.8.2.OSX_x86_64/cufflinks

    You don't need sudo to do this.

    If it works for you, and you want to make it permanent. Edit the .profile and add the same export statement.

    The .profile may not exist, so just create it in the directory the terminal window defaults to. (echo $HOME)

    If you created it, just change the permissions by typing

    chmod 755 .profile

    Next time you start the terminal application, that path should be automagically there!
     
  6. pilotError macrumors 68020

    pilotError

    Joined:
    Apr 12, 2006
    Location:
    Long Island
    #6
    The install instructions from the Cufflinks "Getting Started" page states the following:

    So you need to add the cuffcompare to the path as well...
     
  7. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #7
    To permanently set your path you need to edit the .bash_profile file in your home directory ($HOME).
     
  8. juhuu123 thread starter macrumors newbie

    Joined:
    Jun 1, 2010
    #8

    yeah, but if I can add one, I guess I will manage to add both ;) Cool that you have found, what I am doing. You see, I had my reasons to choose the easier versions, how to install it. However, it is still not easy enough :)


    This .profile, where exactly do I have to add it in this command? I did not understand it from the other thread
     
  9. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #9
    It is an (invisible) file that is found in your home folder. One way to create it is to create a plain text file called profile.txt in your favorite text editor with the commands you want, then do this:
    1. Open Terminal
    2. mv profile.txt .profile
    3. Restart Terminal, so the change takes effect
     
  10. juhuu123 thread starter macrumors newbie

    Joined:
    Jun 1, 2010
    #10
    finally

    So finally I made it!
    The last problem I had to figure out was that my profile is called .bash_profile. When I changed that according to your instructions, I succeeded in adding the variables.
    Thanks a lot to all of you
     

Share This Page