I keep trying to install django and other python packages, and I keep getting the exact same error message:

Installing django-admin.py script to /usr/local/bin
error: /usr/local/bin: File exists

So I look to make sure that my /usr/local folder is okay. At first glance it appears okay, until I try cd-ing into my bin. It says it can't because it's not a directory. Peculiar, I thought, so then I tried a

Anchorage:local khotchkiss$ ls -a -l
total 26168
drwxr-xr-x   6 root  wheel       204 Dec 26 20:18 .
drwxr-xr-x@ 14 root  wheel       476 Feb 24 12:54 ..
-rwxr-xr-x@  1 root  wheel  13395080 Oct 22 23:04 bin
drwxr-xr-x   8 root  wheel       272 Dec 26 20:18 git
drwxr-xr-x   4 root  wheel       136 Dec 18 11:31 include
drwxr-xr-x  12 root  wheel       408 Dec 18 11:31 lib

And haven't a clue of what the 'bin' is, why its so large, and why its preventing me from installing python packages. Any clue?

link|improve this question

40% accept rate
feedback

2 Answers

up vote 3 down vote accepted

Somehow, a regular file got created under the name /usr/local/bin. First thing I'd do is rename/move it someplace out of the way, so your various installs can proceed as normal. Then, you might try to figure out what it is and where it came from: try running the file command on it to see if it's in a recognizable format. Also, use xattr -l on it to see if its extended attributes say anything useful about it.

link|improve this answer
Turned out to be a handbrake executable I forgot to mv correctly. Thanks Gordon! – kylehotchkiss Feb 25 '11 at 6:23
feedback

It prevents you from installing because your django-admin.py installer tries to create a directory /usr/local/bin, but can't, since there's a file by the same name.


Open it with a text or hex editor to see what's in it. It's "only" 13MB. Im afraid it's probably binary data though, given its file name. I suggest you view what its extended attributes are (ls -al@ /usr/local/bin).

If neither attributes (modification date?) nor its content give you a hint what it's for, move it somewhere else and see if something breaks. Might just have been a malfunctioning script or badly worded shell command.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.