我刚刚在我的Ubuntu机器上安装了Maxmind的geoipupdate版本2.3.1。当我运行该命令时,它不会尝试下载最新的数据库,而是立即显示以下消息:
Can't open /usr/local/share/GeoIP/GeoLite2-Country.mmdb.gz
GeoIP目录存在于该位置,并且它已经从我尝试使用GeoIP Python库的其他东西中获得了一些.dat文件,但是在运行命令之前或之后没有.mmdb.gz文件。这是我在/usr/local/etc
# Please see http://dev.maxmind.com/geoip/geoipupdate/ for instructions
# on setting up geoipupdate, including information on how to download a
# pre-filled GeoIP.conf file.
# Enter your user ID and license key below. These are available from
# https://www.maxmind.com/en/my_license_key. If you are only using free
# GeoLite databases, you make leave the 0 values.
UserId 999999
LicenseKey 000000000000
# Enter the product IDs of the databases you would like to update.
# Multiple product IDs are separated by spaces.
ProductIds GeoLite2-Country GeoLite2-City GeoLite-Legacy-IPv6-City GeoLite-Legacy-IPv6-Country 506 517 533
# The following are for the GeoLite Legacy databases. To update them,
# uncomment.
# ProductIds 506 517 533 GeoLite-Legacy-IPv6-Country GeoLite-Legacy-IPv6-City
# The remaining settings are OPTIONAL.
# The directory to store the database files. Defaults to /usr/local/share/GeoIP
# DatabaseDirectory /usr/local/share/GeoIP
# The server to use. Defaults to "updates.maxmind.com".
# Host updates.maxmind.com
# The desired protocol either "https" (default) or "http".
# Protocol https
# The proxy host name or IP address. You may optionally specify a
# port number, e.g., 127.0.0.1:8888. If no port number is specified, 1080
# will be used.
# Proxy 127.0.0.1:8888
# The user name and password to use with your proxy server.
# ProxyUserPassword username:password
# Whether to skip host name verification on HTTPS connections.
# Defaults to "0".
# SkipHostnameVerification 0
# Whether to skip peer verification on HTTPS connections.
# Defaults to "0".
# SkipPeerVerification 0
安装geoipupdate时是否有可能错过了一步?如何获取检查和下载更新数据库的命令?
答案 0 :(得分:0)
您应该以详细模式运行命令:
geoipupdate -v
通过这种方式,您可以了解文件未更新的原因(最可能是错误的DatabaseDirectory
,或者可能是错误的ProductIDs
或EditionIDs
,这会阻止其他下载完成