This package contains only bindings for the libmaxminddb library, the library itself is needed to build and run the bindings.
By default, if a globally-installed libmaxminddb development package (>= 1.2.0) is present on your system, it will be used.
It can be located using pkg-config --modversion libmaxminddb
.
You can compile-it yourself from sources; or easily install it on your system from your package manager:
- Debian / Ubuntu:
sudo apt-get install libmaxminddb-dev
- CentOS:
sudo yum install libmaxminddb-devel
If you don't want to use the global package even if it is present, you can:
- Set the npm package config
libmaxminddb_ignore_global
to true - (or) Set the environment variable
NODE_LIBMAXMINDDB_IGNORE_GLOBAL
to true
... and then run npm install
again.
If the global package is not available, then a prebuilt version will be used (provided by nathan818fr/libmaxminddb-build).
Ready-compiled libmaxminddb binaries are provided for use on the most common platforms:
- Linux x64 (glibc >= 2.24, musl >= 1.1.24)
- Linux ARM64 (glibc >= 2.28, musl >= 1.1.24)
- Linux ARMv7 (glibc >= 2.28)
- Linux ARMv6 (glibc >= 2.24)
- macOS x64 (>= 11.0)
- macOS ARM64 (a.k.a. Apple M1)
- Windows x64
- Windows x86
If you want to choose the prebuilt version to use, you can:
- Set the npm package config
libmaxminddb_version
(eg. to1.6.0-1
) - (or) Set the environment variable
NODE_LIBMAXMINDDB_VERSION
(eg. to1.6.0-1
)
... and then run npm install
again.
Otherwise, you can use your own prebuilt version.
You need to create a .tar.gz
archive with the following structure:
libmaxminddb/maxminddb.h
libmaxminddb/maxminddb_config.h
- (linux/macos)
libmaxminddb/libmaxminddb.a
- (windows)
libmaxminddb/maxminddb.lib
To use it, set ...
- the npm package config
libmaxminddb_version
- (or) the environment variable
NODE_LIBMAXMINDDB_VERSION
... to a URL of your file.
Supported protocols:
http:
eg.http://domain.tld/libmaxminddb.tar.gz
https:
eg.https://domain.tld/libmaxminddb.tar.gz
file:
eg.file:///home/build/libmaxminddb.tar.gz
(see url.fileURLToPath)
Note that each occurrence of {{platform}}
in your URL will be replaced by the
current platform.