title: How to solve `sf` installation error: proj_api.h not found in standard or given locations
body: <p>I need to install <code>sf</code> package for R in CentOS 7.</p>
  <p>The repo versions of <code>gdal</code> and <code>proj</code> are less than the required for the package, so I installed them from source.</p>
  <p>Even linking those libraries I always get the same error:</p>
  <pre><code>configure: GDAL: 3.2.0
  checking proj.h usability... no
  checking proj.h presence... no
  checking for proj.h... no
  checking proj_api.h usability... no
  checking proj_api.h presence... no
  checking for proj_api.h... no
  configure: error: proj_api.h not found in standard or given locations.
  ERROR: configuration failed for package ‘sf’
  </code></pre>
  <p>I have tried different commands, and from diferent sources (CRAN, GitHub, locally) and always get the same error.</p>
  <p>For example:</p>
  <pre><code>install_github(&quot;r-spatial/sf&quot;, configure.args=&quot;--with-gdal-config=/usr/local/gdal-3.2.0/bin/gdal-config --with-proj-lib=/usr/local/proj-7.2.0/lib --with-proj-include=/usr/local/proj-7.2.0/include&quot;)
  </code></pre>
  <p><code>proj_api.h</code> is present at the specified path:</p>
  <pre><code>locate proj_api.h
  /usr/local/proj-7.2.0/include/proj_api.h
  </code></pre>