title: Unable to install AMQP for PHP - Symbol not found error
body: <p>I'm getting the following error when running the code listed below. I have install AMQP extension through PECL and it shows up fine in my php.ini file when I do phpinfo both from the command line and browser.</p>
  
  <pre><code>    &lt;?php
      // amqp rabbitmq client test
  
  
      // Create a connection
      $cnn = new AMQPConnection();
      exit();
  ?&gt;
  </code></pre>
  
  <p>When trying to run that code I get this error:</p>
  
  <pre><code>dyld: lazy symbol binding failed: Symbol not found: _amqp_new_connection
    Referenced from: /opt/local/lib/php/extensions/no-debug-non-zts-20090626/amqp.so
    Expected in: flat namespace
  
  dyld: Symbol not found: _amqp_new_connection
    Referenced from: /opt/local/lib/php/extensions/no-debug-non-zts-20090626/amqp.so
    Expected in: flat namespace
  </code></pre>
  
  <p>These are the install instructions I followed:</p>
  
  <pre><code>Download rabbitmq-c lib from: http://hg.rabbitmq.com/rabbitmq-c/ (.zip file)
  
  Download codegen http://hg.rabbitmq.com/rabbitmq-codegen/summary (.zip file)
  
  
  unzip rabbitmq-c
  
  unzip codegen and put it into the rabbitmq-c lib and rename it codegen
  
  cd into rabbitmq-c dir
  
  autoreconf -i &amp;&amp; ./configure &amp;&amp; make &amp;&amp; sudo make install
  
  
  #install the amqp extension
  sudo pecl install -f amqp
  </code></pre>