port command of MacPorts not found when trying to install wine
Solution 1
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
Solution 2
Late, but if anyone else needs it. First do "sudo port"
second "sync" when ports tree is updated "install wine"
Hope it helps
Related videos on Youtube
Kelvin
Updated on September 18, 2022Comments
-
Kelvin over 1 year
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)
-
HikeMike about 13 yearsUse WineBottler instead. The first Google hit is not necessarily the best for everyone.
-
-
Kelvin about 13 yearsWell, 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 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
-
geekosaur about 13 yearsSo what does
echo $PATH
return? Does it include/opt/local/bin
? If not, you'll need to add that to~/.bash_profile
(see 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. -
Kelvin about 13 yearsthis is what it returns:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
-
Kelvin about 13 yearsso it seems to me that /opt/local/bin is there, does that mean its a problem with the installer updating the wrong startup file?
-
geekosaur about 13 yearsNo, 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, althoughtcl
should be included in OSX.) -
Kelvin about 13 years'no such file or directory'
-
geekosaur about 13 yearsThat does sound like something's wrong with OSX's Tcl. Amending answer since this won't fit in a comment...
-
Kelvin about 13 yearsso 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?
-
geekosaur about 13 yearsNo, 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 (sinceport
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. -
Kelvin about 13 yearsThanks 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)
-
Kelvin about 13 years/bin/sh returns sh-3.2$
-
geekosaur about 13 yearsI'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. -
Kelvin about 13 yearsAlrighty, 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
-
circuitry over 8 yearsthat didn't work but this did: sudo port -d selfupdate