title: How install memcached in Mac Bigsur with PHP 7.3 and home brew
body: <p>I am working on a project with setup <code>PHP7.3</code>, <code>Drupal 6.4</code> with <code>memcached</code>. Memcached is working in server and in my local machine with windows. But I am not able to make it work in my <code>Mac</code> machine. I followed the below link to make this work.</p>
  <p><a href="https://www.journaldev.com/1/install-memcached-mac" rel="nofollow noreferrer">https://www.journaldev.com/1/install-memcached-mac</a></p>
  <p>And I tried</p>
  <pre><code>brew install memcached
  </code></pre>
  <p>Also.</p>
  <p>Then added</p>
  <pre><code>[memcached]
   extension=&quot;memcached.so&quot;
  </code></pre>
  <p>In <code>php.ini</code> file. Then restarted apache. After this on the first run I got the error</p>
  <blockquote>
  <p>{&quot;Error Details&quot;:{&quot;Message&quot;:&quot;\n Error code : 32\n  Message : PHP Startup: Unable to load dynamic library 'memcached.so' (tried: /usr/local/lib/php/pecl/20180731/memcached.so (dlopen(/usr/local/lib/php/pecl/20180731/memcached.so, 9): image not found), /usr/local/lib/php/pecl/20180731/memcached.so.so (dlopen(/usr/local/lib/php/pecl/20180731/memcached.so.so, 9): image not found))\n File name : Unknown\n  Line no : 0\n   Date :12-March-21 02:45:05\n  Path : http://localhost/mysite/?q=&quot;}}</p>
  </blockquote>
  <p>But from the second run onwards the error is not there. But memcache is not working. And I can't find the memcached.so file in my system.</p>
  <p>How can I fix this? Please help</p>