Results 1 to 11 of 11
  1. #1
    Bash command not found

    Member Since
    Nov 15, 2013
    Posts
    36
    Bash command not found
    I am working on installing a physics simulation software package. It comes with a script that is supposed to compile the source code and install all of the data libraries for the simulation software. The installation exited with an error so I then thought maybe I needed to execute the script in sudo for it to work. When I type sudo I get the following:

    -bash: sudo: command not found

    I have also checked to see if a few other things are installed like gcc and command lines tools but I always get responses like
    -bash: gcc: command not found
    -bash: xcode-select: command not found

    This leads me to believe that the problem is not with the script to install but with OSX. This is being installed on a fresh installation of 10.9, any advice?

  2. #2
    Bash command not found
    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    8,184
    Specs:
    27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3
    A fresh installation of OS X will not have the developer tools. You need to install XCode which will give you the command line GCC and other related tools.

    As to 'sudo' not working, that's a bit strange as that should be part of the the base OS X installation.

    What happens when you type
    Code:
    which sudo
    on the command line?
    --
    Regards
    ...Ashwin



    Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.

  3. #3
    Bash command not found

    Member Since
    Nov 15, 2013
    Posts
    36
    I should have clarified fresh installation. I was having these problems so I reformated and installed xcode and command line tools. Command line tools were installed from a .dmg file downloaded form the apple developer site so everything *should* be installed that is necessary.

    When I do "which sudo" I get the same bash command not found jargon. In the past I could see command line tools installed from the downloads tab in preferences but it is not listed there this time. I did find it listed in the locations tab though. I attached two screen shots of what I see in xcode.
    Attached Images Attached Images

  4. #4
    Bash command not found
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,072
    Specs:
    13in macbook - 10.10.4
    Type 'echo $PATH' without the quotes. What do you get?
    Craig Domingue
    (\__/)
    (='.'=) This is Bunny. Copy and paste Bunny into your
    (")_(") signature to help him gain world domination

  5. #5
    Bash command not found

    Member Since
    Nov 15, 2013
    Posts
    36
    MY_MCNP UNEP$ echo $PATH
    /Users/UNEP/MY_MCNP/MCNP_CODE/bin/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin

  6. #6
    Bash command not found
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,072
    Specs:
    13in macbook - 10.10.4
    Your Path is messed up.
    /Users/UNEP/MY_MCNP/MCNP_CODE/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
    See where I put the colon after _CODE/bin ? As is /usr/bin is not found. Are you using a .bashrc or .bash_profile or .profile file in your Home folder?
    Craig Domingue
    (\__/)
    (='.'=) This is Bunny. Copy and paste Bunny into your
    (")_(") signature to help him gain world domination

  7. #7
    Bash command not found

    Member Since
    Nov 15, 2013
    Posts
    36
    Quote Originally Posted by cradom View Post
    Your Path is messed up.
    /Users/UNEP/MY_MCNP/MCNP_CODE/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
    See where I put the colon after _CODE/bin ? As is /usr/bin is not found. Are you using a .bashrc or .bash_profile or .profile file in your Home folder?
    I am using .bash_profile. Here is what the file looks like right now:

    Code:
    export DATAPATH=/Users/UNEP/MY_MCNP/MCNP_DATA$DATAPATH
    export PATH=/Users/UNEP/MY_MCNP/MCNP_CODE/bin$PATH
    does something on one of those two lines need to be changed or something added to it?

  8. #8
    Bash command not found
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,072
    Specs:
    13in macbook - 10.10.4
    Edit it so it says
    Code:
    export DATAPATH=/Users/UNEP/MY_MCNP/MCNP_DATA:$DATAPATH
    export PATH=/Users/UNEP/MY_MCNP/MCNP_CODE/bin:$PATH
    At the end right before $PATH you need a colon. Not really sure about the first one but try anyway, right before $DATAPATH, another colon.
    Restart Terminal so it takes.
    Craig Domingue
    (\__/)
    (='.'=) This is Bunny. Copy and paste Bunny into your
    (")_(") signature to help him gain world domination

  9. #9
    Bash command not found
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,395
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    cradom's answer should fix this since many of the build tools that you'll need - gcc, make, xcode-select - are in /usr/bin. Since that isn't getting properly registered now, a quick fix to the env variable in your .bash_profile should clear this up nicely.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  10. #10
    Bash command not found

    Member Since
    Nov 15, 2013
    Posts
    36
    Thank you thank you everyone! It all installed correctly this morning. I'm curious how the bash become messed up being a fresh install but oh well, it's fixed now!

  11. #11
    Bash command not found
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,072
    Specs:
    13in macbook - 10.10.4
    Looks like whatever script installed that MCNP_CODE stuff didn't add to the $PATH correctly. Programmers make mistakes too.
    Glad you got it right.
    Craig Domingue
    (\__/)
    (='.'=) This is Bunny. Copy and paste Bunny into your
    (")_(") signature to help him gain world domination

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Learning the Command Line - Bash Prompts (1)
    By vansmith in forum OS X - Operating System
    Replies: 0
    Last Post: 04-15-2014, 06:45 PM
  2. -bash g++:command not found
    By Brightsun in forum OS X - Development and Darwin
    Replies: 4
    Last Post: 04-22-2012, 09:20 AM
  3. bash: make: command not found
    By yousemeti in forum OS X - Development and Darwin
    Replies: 9
    Last Post: 02-29-2012, 04:28 PM
  4. bash command window size
    By wfs123 in forum OS X - Operating System
    Replies: 0
    Last Post: 08-07-2011, 04:51 PM
  5. bash 'export' command not working
    By msae in forum OS X - Operating System
    Replies: 8
    Last Post: 07-05-2011, 11:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •