Why do I get "Could not find gdlib-config in the search path" when I try to install GD::Polygon, even though gdlib-config is installed?
<p>I'm trying to install <a href="https://metacpan.org/pod/GD::Polygon" rel="nofollow">GD::Polygon</a> by running <code>cpan install GD::Polygon</code>, but I get the following error:</p>

<pre class="lang-none prettyprint-override"><code>**UNRECOVERABLE ERROR**
Could not find gdlib-config in the search path. Please install libgd 
2.0.28 or higher.
</code></pre>

<p>I manually installed libgd-2.2.1 from source (<code>./configure</code>, <code>make</code>, <code>make install</code>) and now when I run <code>whereis gdlib-config</code>, I see that it is indeed installed:</p>

<pre class="lang-none prettyprint-override"><code>gdlib-config: /usr/local/bin/gdlib-config
</code></pre>

<p>How can I tell <code>cpan</code> where to find this library?</p>