【问题标题】:Maxmind geoipupdate Not Downloading DatabasesMaxmind geoipupdate 不下载数据库
【发布时间】:2017-03-23 16:46:34
【问题描述】:

我刚刚在我的 Ubuntu 机器上安装了 Maxmind 的 geoipupdate 2.3.1 版。当我运行该命令时,它不会尝试下载最新的数据库,而是立即显示以下消息:

Can't open /usr/local/share/GeoIP/GeoLite2-Country.mmdb.gz

GeoIP 目录存在于该位置,并且它已经有一些 .dat 文件,这些文件来自我尝试使用 GeoIP Python 库的其他东西,但在运行命令之前或之后不存在 .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 时是否可能错过了一个步骤?如何获取检查和下载更新数据库的命令?

【问题讨论】:

  • 您运行geoipupdate 的用户是否有权写入该目录?
  • 看来不是,因为我刚才用 sudo 运行它并且它有效。没有消息出现,但我看到数据库已下载到/usr/local/share/GeoIP。谢谢。

标签: linux ubuntu geoip maxmind


【解决方案1】:

您应该以详细模式运行命令: geoipupdate -v

这样您就会明白为什么文件没有更新(很可能是错误的DatabaseDirectory,或者错误的ProductIDsEditionIDs,这将阻止其他下载完成)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-17
    • 1970-01-01
    相关资源
    最近更新 更多