0

I'm not able to execute any unix commands on my Mac OS Terminal. I was adding a path to my Scala Installation Location.

enter image description here

2
  • 1
    You'll have to restore your path variable some how. If you just set the variable in one terminal window, just start another one and the path should work. Otherwise you'll need to figure out what PATH should be on your system. Commented Nov 12, 2013 at 2:23
  • I don't get it. Open another terminal window and open the .bash_profile? It gives me the same error on top of the window. "-bash: export: `Setup/Languages/scala-2.10.3/bin:??': not a valid identifier" Commented Nov 12, 2013 at 2:25

2 Answers 2

3

You've broken your $PATH environment variable, by the looks of it in ~/.bash_profile.

To fix:

  • Start Terminal.app (with error message as you posted).

  • Manually set $PATH:

    export PATH=/usr/bin:/bin
    
  • Edit your ~/.bash_profile:

    vi ~/.bash_profile
    
  • Remove the ?? characters from the scala path. That looks like it might be an invisible character, so I would recommend deleting the line and retyping it.

  • Save and test.

Sign up to request clarification or add additional context in comments.

2 Comments

when i entered ~/.bash_profile it says " Permission denied" Please help i'm not able to enter a single line of code also
You will never understand how much this saved me!
1

It sounds like you've replaced your path, rather than appended the path to Scala. You'll now need to use the full path to commands and then you'll be able to restore the path.

You can call vi from /usr/bin/vim

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.