Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I really don't have much experience with Terminal and I believe I may have caused a problem when trying to download and use wine on my Mac. If I try to type in anything I simply get "Command not found". After reading many forum posts I believe this has something to do with my PATH, but again, I don't really know exactly what that means.

share|improve this question
    
Yes, your PATH variable, in simple terms, controls what commands can be found. Try typing echo $PATH and update your question with the result. –  Andrew Ferrier Oct 26 '12 at 18:03
1  
Could you expand on 'anything'? What exactly are you trying? –  Shaun Oct 26 '12 at 18:34
    
Okay, this is what I get when I type that: /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/op‌​t/local/sbin:/opt/local/bin:/opt/local/sbin:PATHnexport –  Jared Gross Oct 26 '12 at 18:39
    
@Shaun I was trying to use Wine in order to run windows programs. I used instructions from (davidbaumgold.com/tutorials/wine-mac) but I believe I may have done something incorrectly and possibly damaged my system –  Jared Gross Oct 26 '12 at 18:50
    
It looks like you have indeed messed something up. At the least, you should have the system standard paths /usr/bin:/bin:/usr/sbin:/sbin in there. The PATHnexport bit at the end looks very wrong. Which steps from the link you have sent have you followed? I suspect you might have broken your /etc/profile file (Step 2.1). Might help if you can paste the end of that file in (careful not to paste any private info). –  Andrew Ferrier Oct 26 '12 at 18:57
show 11 more comments

1 Answer

Looking at the link and also your path it looks like you have installed Macports. Its installer will change in ~/.profile the path but not in the way you show. See macports document for the correct way to do this.

Editing /etc/profile is not the correct way as it affects all users and is also more complex to deal with as requires root permission and is also an Apple supplied file that could be changed in Apple system upgrades

This explains two of your /opt/local/bin ... etc in your path (/etc/profile and ~/.profile) More and the PATHnexport imply that yor editing of files has gone wrong.

I would restore /etc/profile from a backup to be as Apple set it up, and check that .profile has the lines as per the macports document. Also check to see if you have ~/.bash_profile or ~/.login and check they do not have any alterations to the PATH

If you are not used to Terminal (e.g. if you do not understand what these .profile files are) then it mght be better to install wine via a GUI method e.g. Wineskin or Crossover (Even if you do understand Terminal and shells t is easier to use these)

share|improve this answer
    
As you guessed, I don't know what those profiles are or exactly how to restore them from a backup. Would you mind explaining? –  Jared Gross Oct 26 '12 at 20:28
    
Really a separate question - first question is how do you backup now? –  Mark Oct 26 '12 at 21:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.