title: Mac Homebrew own Package, link error: No such keg
body: <p>I am currently using the Macbook pro with OS 10.9.</p>
  
  <p>And I was trying to install octave to my mac when I found that I have to install gnuplot before I could use the plot in the octave. So I try to install gnuplot using the homebrew. However,the brew got stuck when trying to install the <em>gd</em>, because China's network fails to link to the site <a href="https://bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.0.tar.gz" rel="nofollow">https://bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.0.tar.gz</a> </p>
  
  <p>So I use goagent to download the package via chrome and try to manually install the package and try to link it using brew by the instruction from <a href="https://github.com/mxcl/homebrew/wiki/FAQ" rel="nofollow">https://github.com/mxcl/homebrew/wiki/FAQ</a></p>
  
  <p>And after make install, when I try to use:</p>
  
  <pre><code>brew link libgd
  </code></pre>
  
  <p>the brew prompt error message:</p>
  
  <pre><code>Error: No such keg: /usr/local/Cellar/libgd
  </code></pre>
  
  <p>And I followed exactly the process in the FAQ diy.</p>
  
  <pre><code>$ tar -xvf l-ibgd-2.1.0.tar.gz
  [snip]
  
  $ cd libgd-2.1.0
  
  $ brew diy
  -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/libgd/2.1.0
  
  $ ./configure --prefix=/usr/local/Cellar/libgd/2.1.0
  [snip]
  
  $ make &amp;&amp; make install
  [snip]
  
  $ brew link libgd
  Error: No such keg: /usr/local/Cellar/libgd
  </code></pre>
  
  <p>The configuration and installation are without any error. Any suggestions? Thx a lot!</p>