Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Spontida

macrumors regular
Original poster
Aug 7, 2011
201
4
Last edited:

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
I am tryign to install wine and i've been following this guide: http://www.cultofmac.com/185565/how...mac-without-boot-camp-or-parallels-feature/2/ I entered all the commands before the "sudo install wine" and I got stuck because sudo is not found...

$PATH gives me
Code:
/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:: No such file or directory

The site your linking to is about installing wine through MacPorts. It should be :

Code:
sudo port install wine

not :

Code:
sudo install wine
.

Please post the exact commands or lines you pasted in Terminal and the exact output or errors you got of those commands. Or make a screenshot of your Terminal window.
 

kage207

macrumors 6502a
Jul 23, 2008
971
56
Uh, are you on the admin account? Cause every Unix machine has the ability to sudo, it means to run as admin, even if you aren't on the admin user account.
 

Spontida

macrumors regular
Original poster
Aug 7, 2011
201
4
What's the output of
Code:
which sudo

Most likely the error you're seeing is that whatever you're typing after sudo is what's not found.


From
Code:
 which sudo

I get

Code:
 command not found
 

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
Your PATH is messed up. It should be something like this before you started :

Code:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

After running this :

Code:
echo export PATH=/opt/local/bin:/opt/local/sbin:\$PATH$'\n'export MANPATH=/opt/local/man:\$MANPATH | sudo tee -a /etc/profile

it would be :

Code:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

Close your Terminal window. Open a new Terminal window and type :

Code:
echo $PATH
cat /etc/profile

Post the output you get from those lines. sudo can be found in the /usr/bin directory. If you navigate to that folder in the Finder you can check if it is there.
 
Last edited:

Spontida

macrumors regular
Original poster
Aug 7, 2011
201
4
I got no output but sudo is indeed there.

If I type in $PATH again, the output is this still:

Code:
-bash: /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:: No such file or directory

I also still get:
Code:
-bash: sudo: command not found
When typing
Code:
which sudo
 

tominco

macrumors member
Mar 14, 2008
95
90
Simply try

/usr/bin/sudo <whatever_command_follows>

then be prepared to enter your password to continue.

But beware. Any commands you issue preceded by sudo will be run as "root" (aka administrator) on your computer and you are at risk of screwing things up rather nicely if you don't know what you're doing with the Unix command line.
 

aarond12

macrumors 65816
May 20, 2002
1,145
107
Dallas, TX USA
Both the "which sudo" and "whereis sudo" commands should give you "/usr/bin/sudo". If you're getting "command not found" on "which", then your computer has some serious problems.

Have you tried: sudo -s
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.