title: missing include files during gcc compilation of c program in CentOS
body: <p>I am getting the following errors about missing include libraries when I try to use <code>gcc</code> to compile a c program called <code>some.c</code> on a CentOS 7 server as shown below.  <strong>How can I resolve these errors so that the program compiles properly?</strong></p>
  
  <pre><code>[user@domain ~]$ gcc -fPIC -lcurl -c some.c
  some.c:10:23: fatal error: curl/curl.h: No such file or directory
  #include &lt;curl/curl.h&gt;
  compilation terminated. 
  </code></pre>
  
  <p>When I comment out <code>#include &lt;curl/curl.h&gt;</code> and try again, I get:  </p>
  
  <pre><code>[user@domain ~]$ gcc -fPIC -lcurl -c some.c
  some.c:11:31: fatal error: security/pam_appl.h: No such file or directory
  #include &lt;security/pam_appl.h&gt;
  compilation terminated.
  </code></pre>
  
  <p>I image I would get another error for <code>#include &lt;security/pam_modules.h&gt;</code> if I kept commenting out the include directives, because the list of includes as the top of <code>some.c</code> is:  </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;curl/curl.h&gt;
  #include &lt;security/pam_appl.h&gt;
  #include &lt;security/pam_modules.h&gt;
  </code></pre>
  
  <p>In Java, the imports are handled by the jvm/jdk, so you don't have to worry about this kind of thing.  Or you use maven if it is not a core library.  Or you place all the jar dependencies in a folder that you mark as the classpath.  Is there some easy solution to this c problem like <code>yum install clibs</code>?  Or do I have to manually move libraries to some directory?  <strong>How can I resolve these compilation errors so that <code>gcc</code> can successfully compile the <code>some.c</code> program?</strong> </p>