Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 am trying to find out which path actually resolves to %{_includedir} in a Centos6 installation.

I understand that this is normally "/usr/include" but where can I find where it is actually set or somehow "echo" it?

Basically, a spec I am using has "%dir %{_includedir}/someFolder/someFile". Everything runs fine but I can't find "/usr/include/someFolder". I assume it has been created somewhere else and I am trying to find out where that is.

share|improve this question
up vote 2 down vote accepted

rpmbuild --showrc shows all marcos available, _includedir is one of them:

-14: _includedir        %{_prefix}/include

(no idea what -14 means).

Marcos are being set system-wide somewhere in /etc/rpmrc or /etc/rpm/ or similar (was not able to find actual location, never needed it), and you can override them in ~/.rpmmacros file.

See also:

share|improve this answer
$ rpm -E '%{_includedir}'
/usr/include   # The actual location may vary
share|improve this answer
Just seeing this. Works better than the accepted answer so I have +1ed it. Keeping my acceptance on the previous since it came first and did get me the info I wanted. – Dayo Mar 27 '12 at 20:09

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.