port command of MacPorts not found when trying to install wine

1

1

I'm an absolute terminal noob (the wine installation process was my first ever time opening it) so its probably a simple fix. that being said I will need any answer broken down to its simplest possible components, I'm a proficient copy-paster :P

I am trying to instal wine on my macbook with snow leopard, I've been following an online tutorial and installed mac ports, a java package, and xcode. however when comes to the actual installation of wine, this happens:

bogon:~ Chris$  sudo port install wine
Password:
sudo: port: command not found
bogon:~ Chris$ 

Based on my research the problem has something to do with configuring xcode properly. If you agree that this is the likely culprit, could someone please break down just how to that, something to do with my profile or something like that (did I mention I'm a noob :P)

Chris

Posted 2011-04-02T03:57:43.500

Reputation: 11

1Use WineBottler instead. The first Google hit is not necessarily the best for everyone. – Daniel Beck – 2011-04-02T04:45:07.223

Answers

2

Actually, your problem is more likely that /opt/local/bin isn't in your (or root's) $PATH, which will happen if you are using a Terminal window that was open when you installed MacPorts or if you overrode its attempt to add $PATH to your shell configuration. If there are XCode issues, you won't find out about them until you can run port.

EDIT: per comments, this appears to be a missing tclsh. On my Snow Leopard system, its vitals:

mress:10078 Z$ ls -l /usr/bin/tclsh
lrwxr-xr-x  1 root  wheel  8 Nov 19  2009 /usr/bin/tclsh@ -> tclsh8.5
mress:10079 Z$ ls -lL /usr/bin/tclsh
-rwxr-xr-x  1 root  wheel  42640 Jul 23  2009 /usr/bin/tclsh*
mress:10080 Z$ pkgutil --file-info /usr/bin/tclsh
volume: /
path: /usr/bin/tclsh

pkgid: com.apple.pkg.BSD
pkg-version: 10.6.0.1.1.1238328574
install-time: 1258693096
uid: 0
gid: 0
mode: 755

geekosaur

Posted 2011-04-02T03:57:43.500

Reputation: 10 195

Well, I'm using a new terminal window, have tried several times, even after a restart. And I haven't overrode anything as far as I know (don't know how to do that - and by extension whether or not I have). I've been following this http://davidbaumgold.com/tutorials/wine-mac/ to the dot, and everything was going smoothly until 'part 3', when the above mentioned error happened. Thanks for the quick reply btw

– Chris – 2011-04-02T04:59:07.427

So what does echo $PATH return? Does it include /opt/local/bin? If not, you'll need to add that to ~/.bash_profile (see http://guide.macports.org/#installing.shell for details). Interestingly, I see that notes problems with the installer updating the wrong startup file, which could also lead to this.

– geekosaur – 2011-04-02T05:04:22.050

this is what it returns:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin – Chris – 2011-04-02T05:13:36.433

so it seems to me that /opt/local/bin is there, does that mean its a problem with the installer updating the wrong startup file? – Chris – 2011-04-02T05:16:13.887

No, that suggests something else is wrong. Does /opt/local/bin/port exist? If so, what happens if you run it by full path? (Conceivably the system might not be finding Tcl to interpret the script for some reason, although tcl should be included in OSX.) – geekosaur – 2011-04-02T05:19:02.997

'no such file or directory' – Chris – 2011-04-02T05:23:20.403

That does sound like something's wrong with OSX's Tcl. Amending answer since this won't fit in a comment... – geekosaur – 2011-04-02T05:27:30.043

so I tried to go to /usr/bin/tclsh, get a '%' symbol, which I think is asking me to log on to tlcsh, right? if so how do I do this, and is this right? – Chris – 2011-04-02T05:36:29.213

No, that's the Tcl interactive prompt. Type exit to get back to the shell. The only other thing I can think of seems highly unlikely: that /bin/sh is somehow missing (since port is actually a script wrapper), but that would break the system pretty thoroughly. I have to admit I'm curious about whats going on, though. – geekosaur – 2011-04-02T05:43:18.940

Thanks for your help so far btw man, I think I'm going to try it the wine bottler way, the drag and drop mechanics seem to fit my style and level of computer savvy-ness a bit better. if you think of something though, let me know, and I'll still give it a try (got some time before wine bottler finishes DLing anyway) – Chris – 2011-04-02T05:47:15.070

/bin/sh returns sh-3.2$ – Chris – 2011-04-02T05:49:29.313

I'm a little surprised you stuck with it this long before switching, to be honest. :) If you still want to poke at MacPorts at some point, try asking for help in the #macports IRC channel on FreeNode. – geekosaur – 2011-04-02T05:52:12.527

Alrighty, well I just hope wine bottler works :) I just want to get around the Chinese firewall. tried 5 or 6 mac apps, no luck (even ones I've used in the past successfully), thought I'd give some PC apps a shot (didn't know I was in for such a struggle though!) If you know any easier ways to do that, that would be great too – Chris – 2011-04-02T05:55:23.473

2

Late, but if anyone else needs it. First do "sudo port"

second "sync" when ports tree is updated "install wine"

Hope it helps

Jaka

Posted 2011-04-02T03:57:43.500

Reputation: 21

that didn't work but this did: sudo port -d selfupdate – circuitry – 2015-12-10T05:10:20.133