title: PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql.so' - module installed
body: <p>I've searched on thousand posts and still did not find a solution for my issue. Other posts there's no answer. Please do not mark as duplicate, because it isn't. In my case, the file exists on directory but is not recognized.</p>
  <p>I am getting the error PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql.so' when I type the command:</p>
  <pre><code>php -v
  </code></pre>
  <p>I got this output:</p>
  <pre><code>PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php/20190902/pdo_mysql.so (/usr/lib/php/20190902/pdo_mysql.so: undefined symbol: mysqlnd_allocator), /usr/lib/php/20190902/pdo_mysql.so.so (/usr/lib/php/20190902/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
  PHP 7.4.3 (cli) (built: Mar  2 2022 15:36:52) ( NTS )
  Copyright (c) The PHP Group
  Zend Engine v3.4.0, Copyright (c) Zend Technologies
      with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
  </code></pre>
  <p>I have reinstalled php-mysql several times, tried to install the module pdo-mysql itself and nothing.</p>
  <p>With the command <code>php -m</code> , i got all module (but missing pdo_mysql)</p>
  <pre><code>PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php/20190902/pdo_mysql.so (/usr/lib/php/20190902/pdo_mysql.so: undefined symbol: mysqlnd_allocator), /usr/lib/php/20190902/pdo_mysql.so.so (/usr/lib/php/20190902/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
  [PHP Modules]
  bz2
  calendar
  Core
  ctype
  curl
  date
  dom
  exif
  FFI
  fileinfo
  filter
  ftp
  gd
  gettext
  hash
  iconv
  imagick
  json
  libxml
  mbstring
  openssl
  pcntl
  pcre
  PDO
  Phar
  posix
  readline
  Reflection
  session
  shmop
  SimpleXML
  sockets
  sodium
  SPL
  ssh2
  standard
  sysvmsg
  sysvsem
  sysvshm
  tokenizer
  xml
  xmlreader
  xmlwriter
  xsl
  Zend OPcache
  zip
  zlib
  
  [Zend Modules]
  Zend OPcache
  </code></pre>
  <p>But the file itself exists on directory mentioned on the error:</p>
  <pre><code>/usr/lib/php/20190902  ls -la                                                                                                   ✔  4 ⚙  3444  19:35:10
  total 9,9M
  drwxr-xr-x 2 root root 4,0K Mar  5 18:46 .
  drwxr-xr-x 4 root root 4,0K Mar  5 18:46 ..
  -rw-r--r-- 1 root root  31K Mar  2 12:36 bz2.so
  -rw-r--r-- 1 root root  43K Mar  2 12:36 calendar.so
  -rw-r--r-- 1 root root  15K Mar  2 12:36 ctype.so
  -rw-r--r-- 1 root root 103K Mar  2 12:36 curl.so
  -rw-r--r-- 1 root root 167K Mar  2 12:36 dom.so
  -rw-r--r-- 1 root root  91K Mar  2 12:36 exif.so
  -rw-r--r-- 1 root root 159K Mar  2 12:36 ffi.so
  -rw-r--r-- 1 root root 5,5M Mar  2 12:36 fileinfo.so
  -rw-r--r-- 1 root root  67K Mar  2 12:36 ftp.so
  -rw-r--r-- 1 root root 115K Mar  2 12:36 gd.so
  -rw-r--r-- 1 root root  19K Mar  2 12:36 gettext.so
  -rw-r--r-- 1 root root  51K Mar  2 12:36 iconv.so
  -rw-r--r-- 1 root root 448K Mar  2  2020 imagick.so
  -rw-r--r-- 1 root root  47K Mar  2 12:36 json.so
  -rw-r--r-- 1 root root 1,1M Mar  2 12:36 mbstring.so
  -rw-r--r-- 1 root root 143K Mar  2 12:36 mysqli.so
  -rw-r--r-- 1 root root 254K Mar  2 12:36 mysqlnd.so
  -rw-r--r-- 1 root root 543K Mar  2 12:36 opcache.so
  -rw-r--r-- 1 root root  35K Mar  2 12:36 pdo_mysql.so
  -rw-r--r-- 1 root root 111K Mar  2 12:36 pdo.so
  -rw-r--r-- 1 root root 275K Mar  2 12:36 phar.so
  -rw-r--r-- 1 root root  43K Mar  2 12:36 posix.so
  -rw-r--r-- 1 root root  39K Mar  2 12:36 readline.so
  -rw-r--r-- 1 root root  15K Mar  2 12:36 shmop.so
  -rw-r--r-- 1 root root  55K Mar  2 12:36 simplexml.so
  -rw-r--r-- 1 root root  99K Mar  2 12:36 sockets.so
  -rw-r--r-- 1 root root  89K Feb 28  2020 ssh2.so
  -rw-r--r-- 1 root root  23K Mar  2 12:36 sysvmsg.so
  -rw-r--r-- 1 root root  15K Mar  2 12:36 sysvsem.so
  -rw-r--r-- 1 root root  19K Mar  2 12:36 sysvshm.so
  -rw-r--r-- 1 root root  27K Mar  2 12:36 tokenizer.so
  -rw-r--r-- 1 root root  39K Mar  2 12:36 xmlreader.so
  -rw-r--r-- 1 root root  55K Mar  2 12:36 xml.so
  -rw-r--r-- 1 root root  51K Mar  2 12:36 xmlwriter.so
  -rw-r--r-- 1 root root  35K Mar  2 12:36 xsl.so
  -rw-r--r-- 1 root root  71K Mar  2 12:36 zip.so
  </code></pre>
  <p>I'm on a Linux Mint 20, latest version of php, mysql and apache.
  Does anybody know how to install pdo_mysql and get rid of this issue?</p>