Join the community today
Register Now

[Solved] MaxMind DB Reader install issue on fresh install

Discussion in 'Bug Reports' started by dcg, Nov 29, 2022.

  1. dcg

    dcg Premium Member Premium Member

    61
    22
    8
    Oct 17, 2015
    Florida, USA
    Ratings:
    +45
    Local Time:
    4:43 AM
    1.21.x
    10.3.x
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 124stable
    • Nginx Version Installed: 1.23.2
    • PHP Version Installed: 8.0.26
    • MariaDB MySQL Version Installed: 10.3
    • When was last time updated Centmin Mod code base ? : fresh install
    • Persistent Config:
      Code (Text):
      #NGINX_VERSION='1.23.2'
      #PHP_VERSION='8.0.26'
      PHP_PGO_ALWAYS='y'
      PHP_PGO='y'
      
      
      NGINXCPU_AUTOTUNE_NEW='y'
      NGINX_DYNAMICTLS='y'
      NGINX_DEVTOOLSETGCC='y'
      DEVTOOLSETELEVEN='y'
      AUTOTUNE_CLIENTMAXBODY='y'
      AUTOHARDTUNE_NGINXBACKLOG='y'
      NGINX_SSLCACHE_ALLOWOVERRIDE='y'
      NGINX_STAPLE_CACHE_OVERRIDE='y'
      NGINX_STAPLE_CACHE_TTL='86400'
      NGINX_LIBBROTLI='y'
      NGINX_DYNAMICTLS='y'
      NGXDYNAMIC_BROTLI='y'
      NGXDYNAMIC_MEMC='y'
      NGXDYNAMIC_REDISTWO='y'
      NGINX_GEOIPTWOLITE='y'
      NGXDYNAMIC_GEOIPTWOLITE='y'
      NGXDYNAMIC_GEOIP='y'
      
      LETSENCRYPT_DETECT='y'
      PHP_PGO='y'
      PHP_BROTLI='y'
      PHP_LZFOUR='y'
      PHP_LZF='y'
      PHP_ZSTD='y'
      PHP_TUNING='y'
      PHPFINFO='y'
      DMOTD_PHPCHECK='y'
      GCCINTEL_PHP='y'
      CLOUDFLARE_ZLIB='y'
      CLOUDFLARE_ZLIB_DYNAMIC='y'
      NGINX_ZERODT='y'
      
      NGINXBACKUP='y'
      
      MEMCACHED_INSTALL='y' # Install Memcached
      PHP_MEMCACHE='n' # memcache PHP extension
      PHP_MEMCACHED='y' # memcached PHP extension
      PHPREDIS='y'                # redis PHP extension install
      
      
      ZSTD_LOGROTATE_PHPFPM='y'
      ZSTD_LOGROTATE_NGINX='y'
      
      ##################################
      ## Nginx SSL options
      
      # control variables post vhost creation
      # whether cloudflare.conf include file is uncommented (enabled) or commented out (disabled)
      VHOSTCTRL_CLOUDFLAREINC='y'
      # whether autoprotect-$vhostname.conf include file is uncommented (enabled) or commented out (disabled)
      VHOSTCTRL_AUTOPROTECTINC='y'
      VHOST_PRESTATICINC='y'
      
      
      NGINX_UPDATEMAINTENANCE='n'
      PHP_UPDATEMAINTENANCE='n'
      MARIADB_UPDATEMAINTENANCE='y'
      #####################################################
      # MariaDB overrides
      ###############################################################
      MARIADB_INSTALLTENTHREE='y' # MariaDB 10.3 YUM default install if set to yes
      ENABLE_MARIADBTENTWOUPGRADE='y'
      ENABLE_MARIADBTENTHREEUPGRADE='y'
      ENABLE_MARIADBTENFOURUPGRADE='n'
      SET_DEFAULT_MYSQLCHARSET='utf8mb4'
      
      
      
      SELFSIGNEDSSL_ECDSA='y'
      LETSENCRYPT_DETECT='y'
      DUALCERTS='y'
      
      
      

    Install error for php extension maxminddb.so looks like it can't find the required header files for the make process.
    Might be related to this issue: Unable to locate maxminddb.h in custom installation · Issue #47 · maxmind/MaxMind-DB-Reader-php

    compiling MaxMind DB Reader PHP API extension.../svr-setup /svr-setup/geoip ~ - Pastebin.com


    Code (Text):
    /bin/sh /svr-setup/MaxMind-DB-Reader-php/ext/libtool --mode=compile cc -I. -I/svr-setup/MaxMind-DB-Reader-php/ext -I/svr-setup/MaxMind-DB-Reader-php/ext/include -I/svr-setup/MaxMind-DB-Reader-php/ext/main -I/svr-
    setup/MaxMind-DB-Reader-php/ext -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/li
    b  -DHAVE_CONFIG_H  -g -O2    -c /svr-setup/MaxMind-DB-Reader-php/ext/maxminddb.c -o maxminddb.lo
    mkdir .libs
     cc -I. -I/svr-setup/MaxMind-DB-Reader-php/ext -I/svr-setup/MaxMind-DB-Reader-php/ext/include -I/svr-setup/MaxMind-DB-Reader-php/ext/main -I/svr-setup/MaxMind-DB-Reader-php/ext -I/usr/local/include/php -I/usr/loc
    al/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /svr-setup/MaxMind-DB-Reader-php/ext/ma
    xminddb.c  -fPIC -DPIC -o .libs/maxminddb.o
    /svr-setup/MaxMind-DB-Reader-php/ext/maxminddb.c:27:10: fatal error: maxminddb.h: No such file or directory
       27 | #include <maxminddb.h>
          |          ^~~~~~~~~~~~~
    compilation terminated.
    make: *** [Makefile:209: maxminddb.lo] Error 1
    /bin/sh /svr-setup/MaxMind-DB-Reader-php/ext/libtool --mode=compile cc -I. -I/svr-setup/MaxMind-DB-Reader-php/ext -I/svr-setup/MaxMind-DB-Reader-php/ext/include -I/svr-setup/MaxMind-DB-Reader-php/ext/main -I/svr-
    setup/MaxMind-DB-Reader-php/ext -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/li
    b  -DHAVE_CONFIG_H  -g -O2    -c /svr-setup/MaxMind-DB-Reader-php/ext/maxminddb.c -o maxminddb.lo
     cc -I. -I/svr-setup/MaxMind-DB-Reader-php/ext -I/svr-setup/MaxMind-DB-Reader-php/ext/include -I/svr-setup/MaxMind-DB-Reader-php/ext/main -I/svr-setup/MaxMind-DB-Reader-php/ext -I/usr/local/include/php -I/usr/loc
    al/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /svr-setup/MaxMind-DB-Reader-php/ext/ma
    xminddb.c  -fPIC -DPIC -o .libs/maxminddb.o
    /svr-setup/MaxMind-DB-Reader-php/ext/maxminddb.c:27:10: fatal error: maxminddb.h: No such file or directory
       27 | #include <maxminddb.h>
          |          ^~~~~~~~~~~~~
    compilation terminated.
    make: *** [Makefile:209: maxminddb.lo] Error 1
    
     
  2. dcg

    dcg Premium Member Premium Member

    61
    22
    8
    Oct 17, 2015
    Florida, USA
    Ratings:
    +45
    Local Time:
    4:43 AM
    1.21.x
    10.3.x
    The only location of headers files after fresh install is:
    /usr/local/nginx-dep/include/maxminddb.h
     
  3. eva2000

    eva2000 Administrator Staff Member

    49,737
    11,437
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,772
    Local Time:
    7:43 PM
    Nginx 1.21.x
    MariaDB 10.x
    what's output for
    Code (Text):
    nginx -V

    when did you set
    Code (Text):
    NGINX_GEOIPTWOLITE='y'
    NGXDYNAMIC_GEOIPTWOLITE='y'
    

    as Nginx needs to compile geoip2 lite before PHP can use that extension

    if you set the 2 persistent config variables, run centmin.sh menu option 4 and then exit and run centmin.sh menu option 5, does it work?
     
  4. eva2000

    eva2000 Administrator Staff Member

    49,737
    11,437
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,772
    Local Time:
    7:43 PM
    Nginx 1.21.x
    MariaDB 10.x
    This still applies, though I found 124.00stable is missing additional updates that 130.00beta01 has for libmaxmind detection for MaxMind DB Reader PHP extension routine.

    On 130.00beta01 this works fine
    Code (Text):
    php --ri maxminddb
    
    maxminddb
    
    MaxMind DB Reader => enabled
    maxminddb extension version => 1.11.0
    libmaxminddb library version => 1.7.1
    

    I've updated 124.00stable with backported code from 130.00beta01 for this. So run cmupdate and then run centmin.sh menu option 5