title: Problem installing mcrypt on PHP 7.3.13 Ubuntu
body: <p>This is what I have been doing. </p>
  
  <pre><code>$ sudo apt-get -y install gcc make autoconf libc-dev pkg-config
  $ sudo apt-get -y install libmcrypt-de
  $ sudo pecl install mcrypt-1.0.2
  &gt; libmcrypt prefix? [autodetect] :
  </code></pre>
  
  <p>Im adding "extension=mcrypt.so" to php.ini </p>
  
  <p>Then I do</p>
  
  <pre><code>sudo bash -c "echo extension=/usr/lib/php/20190902/mcrypt.so &gt; /etc/php/7.2/cli/conf.d/mcrypt.ini"
  sudo bash -c "echo extension=/usr/lib/php/20190902/mcrypt.so &gt; /etc/php/7.2/apache2/conf.d/mcrypt.ini"
  </code></pre>
  
  <p>I followed these instruction: <a href="https://lukasmestan.com/install-mcrypt-extension-in-php7-2/" rel="noreferrer">https://lukasmestan.com/install-mcrypt-extension-in-php7-2/</a></p>
  
  <p>Lastly I check with <code>php -i | grep mcrypt</code></p>
  
  <p>This is my output:</p>
  
  <pre><code>PHP Warning:  PHP Startup: mcrypt: Unable to initialize module
  Module compiled with module API=20190902
  PHP    compiled with module API=20180731
  These options need to match
   in Unknown on line 0
  /etc/php/7.3/cli/conf.d/20-mcrypt.ini,
  /etc/php/7.3/cli/conf.d/mcrypt.ini
  </code></pre>
  
  <p>I have checked both 20-mcrypt.ini and mcrypt.ini and they look exaclty the same. 
  But my PHP seems to be compiled with the wrong module API. I google around but couldn't find anything specific on that. Any idéas? Thanks! </p>
  
  <p><a href="https://i.stack.imgur.com/Eojjc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Eojjc.png" alt="enter image description here"></a></p>
  
  <p>What I have been using </p>
  
  <ul>
  <li><a href="https://websiteforstudents.com/install-php-7-2-mcrypt-module-on-ubuntu-18-04-lts/" rel="noreferrer">https://websiteforstudents.com/install-php-7-2-mcrypt-module-on-ubuntu-18-04-lts/</a></li>
  <li><a href="https://stackoverflow.com/questions/48275494/issue-in-installing-php7-2-mcrypt">Issue in installing php7.2-mcrypt</a></li>
  <li><a href="https://gist.github.com/arzzen/1209aa4a430bd95db3090a3399e6c35f" rel="noreferrer">https://gist.github.com/arzzen/1209aa4a430bd95db3090a3399e6c35f</a></li>
  <li><a href="https://stackoverflow.com/questions/50354696/howto-ubuntu-18-04-install-activate-php-extension-ext-mcrypt">Howto ubuntu 18.04 install / activate PHP extension ext-mcrypt</a></li>
  </ul>