/usr/local/bin: Not a directory
Posted by Dave Minor Mon, 16 Jan 2006 17:44:34 GMT
Here’s an FYI for anyone who runs across this. It’s really pretty straight forward but had me spooked for a minute.
I was installing an app from source. When I ran sudo make install, I didn’t get an error, but I also didn’t have anything in my /usr/local/bin directory because it wasn’t a directory at all, but a single file.
This freaked me out at first because I compile a lot of things from source on my main box, but this was on a different box. I had /usr/local and /usr/local/lib directories intact. I went to a completely fresh install of Tiger and noticed that /usr/local does not exist out of the box on Tiger. The Tiger box I was having problems with was not a fresh install, but an upgrade from Panther.
My hypothesis (which turned out to be correct) was that the make had run a $ cp package_bin /usr/local/bin, but since there wasn’t a /usr/local/bin already created, it just copied my binary to a file called bin in /usr/local.
To test this, I did:
$ sudo mv /usr/local/bin /usr/local/bin.old
$ sudo mkdir /usr/local/bin
$ sudo make install
Then I compared the file sizes of /usr/local/bin.old and /usr/local/bin/package_bin and found them to be identical in size. That led me to conclude that my hypothesis was correct and now everything works nicely.
Hopefully this will help someone in their attempt to install apps from source who are having trouble with ”/usr/local/bin: Not a directory” issues.




