Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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.

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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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