su: Command not found.

Discussion in 'Mac Help/Tips' started by AmbitiousLemon, Mar 14, 2003.

  1. AmbitiousLemon Moderator emeritus

    AmbitiousLemon

    Joined:
    Nov 28, 2001
    Location:
    down in Fraggle Rock
    #1
    Well this is interesting. Any ideas?

    sudo: Command not found.

    su: Command not found.

    ls: Command not found.


    I recently started up apache, php4, sendmail, and mysql.

    i used sudo and su during the installation and everything went fine and everything is working properly. i went back into the terminal to edit the httpd.conf file again and it told me sudo wasn't found. i soon found sudo wasn't the only command not found.

    Any Ideas?


    [EDIT] looks like the fault lies with part of the MySQL install. Editing the .tcshrc file.

    The install read me said use:
    setenv PATH "$PATH:/Library/MySQL/bin"

    This didn't work.

    So I used:
    setenv PATH "/Library/MySQL/bin"

    This worked... but lead to the problem described above.

    breaking this by entering anything that doesn't work (either the recommended path or setenv PATH "/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/Library/MySQL/bin") fixes the above problem but won't allow me to access mysql with just a command "mysql" without path (the purpose of the whole thing)

    anyone know what is wrong with these paths and what is happening?
     
  2. iJon macrumors 604

    iJon

    Joined:
    Feb 7, 2002
    #2
    sounds like you may not even have bsd installed. go get your install cd, get tinkertool and tell it to show all folders. and find the bsd subsystem package and make sure you have it installed. you can also look in your receipts folder and see if it was ever installed.

    iJon
     
  3. AmbitiousLemon thread starter Moderator emeritus

    AmbitiousLemon

    Joined:
    Nov 28, 2001
    Location:
    down in Fraggle Rock
    #3
    bsd is installed. i use dev tools (in fact i needed dev tools to get sendmail up and running).
     
  4. iJon macrumors 604

    iJon

    Joined:
    Feb 7, 2002
    #4
    hmm thats as far as i know. after i kept reading your post i figured that you did have it installed. oh well. someone who knows more about that part of os x will come to your rescue. have you tried logging into different names and seeing if that works, probablyt not but im just trying to help.

    iJon
     
  5. AmbitiousLemon thread starter Moderator emeritus

    AmbitiousLemon

    Joined:
    Nov 28, 2001
    Location:
    down in Fraggle Rock
    #5
    i considered that but im the only user and i don't really want to create another.

    right now everything works except my .tcshrc is whacked, so i cant access mysql without writing out the full path. i can fix it as described above, but then nothign else works. so i suppose i can leave it broken, its just annoying.
     
  6. szark macrumors 68030

    szark

    Joined:
    May 14, 2002
    Location:
    Arid-Zone-A
    #6
    Re: su: Command not found.

    Try using:

    setenv PATH "${PATH}:/Library/MySQL/bin"

    or putting it at the end:

    setenv PATH "/Library/MySQL/bin:$PATH"
     
  7. AmbitiousLemon thread starter Moderator emeritus

    AmbitiousLemon

    Joined:
    Nov 28, 2001
    Location:
    down in Fraggle Rock
    #7
    Excellent.

    Thanks so much.

    The first path you suggested worked (didn't try the second sicne the first worked).
     
  8. szark macrumors 68030

    szark

    Joined:
    May 14, 2002
    Location:
    Arid-Zone-A
    #8
    Sometimes the shells aren't sure exactly where the environment variable name ends. The braces tell it exactly where the name of the variable begins and ends.

    Glad I could help! :)
     

Share This Page