I was trying to add a new library/header and seem to have broken gcc. Specifically, I used the command:
$ sudo cp mylib.h /usr/local/include
This seems to have replaced the /usr/ directory with a file because I get the following error when trying to compile trivial programs
cc1: error: /usr/local/include: not a directory
I can't find the file or directory, but then again I don't know where to look. Is there a way to recreate the /usr/local/include directory? Can I simply reinstall gcc?
P.S. I know using sudo was a stupid mistake. I was bone-headly following some instructions I found online.
Any advice as to where I should look would be greatly appreciated.
[edit] I am using mac OSX 10.6.
ls /usr/local/include
sudo rm /usr/local/include
, and create directorysudo mkdir /usr/local/include
, then install your header withsudo cp mylib.h /usr/local/include/
/usr/local/include
didn't previously exist. You need to create the folder first and then copy your library file into it