OK, this question may sound too basic, but this doesn't mean I'm not still a bit confused :
- I'm running OS X 10.6.8 (shouldn't make much difference though, the issue is more like *nix-specific)
- I had installed (with a setup package) an app (D for Xcode) which obviously spread its binaries throughout the system
- Then, I tried deleting the main binary from where it was supposed to be (
/Library/Compilers/dmd2/osx/bin/dmd
) and installed it (actually I'm talking about the D compiler, but shouldn't really matter) as usual on/usr/bin
Now, here's the issue :
- If I try to execute the app like
/usr/bin/dmd
, it works fine If I try to run it just with
dmd
(it's in/usr/bin
, which is in turn belongs to the$PATH
, right?), it tries to launch it from the previous location and I'm getting errors...dmd: failed to launch executable at /Library/Compilers/dmd2/osx/bin/dmd.drkiMac
Any ideas how this could be fixed, so that when typing dmd
it looks at the correct location?
echo $PATH
will list it. There might be a leftover setting in your shell profile or/etc/paths.d
$PATH
is/opt/local/bin:/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/engines:/usr/X11/bin:/opt/local/bin:/opt/local/sbin
which doesn't look that helpful. Now, as for/etc/paths.d
, I don't think there is anything helpful in there as well (don't actually think this location is of much use to OS X, anyway)/etc/paths.d
is used for many system wide installers for its simplicity. Things like/etc/profile
aren't even touched.)