Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying a source install (configure, make) on FreeBSD but I get this error:

error: foo.h: No such file or directory

although the file does exist at /usr/local/include/foo.h so I guess the compiler is not looking in /usr/local/include .

How do I make it do so:




haven't helped. (The install works works fine on OS 10.7 Tiger)

share|improve this question
up vote 1 down vote accepted

Take a look at C_INCLUDE_PATH and CPLUS_INCLUDE_PATH environment variables:

export C_INCLUDE_PATH=/usr/local/include/:${C_INCLUDE_PATH}
export CPLUS_INCLUDE_PATH=/usr/local/include/:${CPLUS_INCLUDE_PATH}
share|improve this answer

Your Answer


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.