symbolic link to /usr/local/bin not running the program unless logged in as su

5,184

What makes you think it is in your $PATH? Try running echo $PATH, do you see /usr/local/bin?

If you are running this through an ssh session my guess is that you have added /usr/local/bin to your $PATH in your ~/.bahsrc and that is not read when you ssh into a machine. Try adding this to your ~/.profile instead:

PATH=$PATH:/usr/local/bin
Share:
5,184

Related videos on Youtube

wbg
Author by

wbg

Updated on September 18, 2022

Comments

  • wbg
    wbg over 1 year

    I'm trying to get eclipse 3.8 installed on Ubuntu 10.04. I've put the extracted files on:

    /opt
    

    I put a symbolic link in:

    /usr/local/bin 
    

    ls -s /usr/local/bin:

    eclipse -> /opt/eclipse/eclipse
    

    My path has /usr/local/bin in it...the permissions for the sym link are 777.

    I also did as su:

    chmod 755 /opt/eclipse/eclipse
    

    When I try to run eclipse as root, it works ( at least it tries, getting java error ). Trying as regular user just gives me the prompt that I need to install eclipse-platform from the repo.

    • wbg
      wbg almost 11 years
      I changed the permission on the /opt/eclipse dir from 754 to 755 which now gives a different error when trying to start eclipse as regular user: cannot open shared object file: No such file or directory Eclipse:eclipse The Eclipse executable launcher was unable to locate its companion shared library. The Eclipse executable launcher was unable to locate its companion shared library.
    • wbg
      wbg almost 11 years
      It appears there's an environment variable and I'm working on this via ssh without X11 working.
    • wbg
      wbg almost 11 years
      I think I solved my issue by setting the permissions on the eclipse parent and the env variable which tells eclipse where the it's root dir is. I can't confirm until I try locally. Thank JMG for the edits.
    • terdon
      terdon almost 11 years
      Remember to post your solution as an answer and accepted if you've solved it.
  • wbg
    wbg almost 11 years
    It seems I might have solved my problem as noted in my comments to my question. I'll check it out in person first. I did echo $PATH originally. Thanks for your thoughts.
  • terdon
    terdon almost 10 years
    @wbg great! Do remember to post it as an answer if you've found it. Also, I just realized I'd made a mistake in my answer. It is ~/.bashrc that is not read when you ssh and ~/.profile that is. My guess is that you were setting your PATH in ~/.bashrc and that's why it wasn't working. This won't be the case if you're opening a terminal locally though.