【问题标题】:set up Darwin Calendar Server get an error about "MD5 sum for download file..."设置 Darwin Calendar Server 收到有关“MD5 sum for download file...”的错误
【发布时间】:2013-09-02 15:56:41
【问题描述】:

我在设置 Darwin Calendar Server 时,下载 dateutil 时出错:

    Downloading dateutil...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
149   298  149   298    0     0    316      0 --:--:-- --:--:-- --:--:--  1828

dateutil is not available from calendarserver.org; trying upstream source.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
124   372  124   372    0     0    267      0  0:00:01  0:00:01 --:--:--   267

Checking MD5 sum for dateutil...
ERROR: MD5 sum for downloaded file is wrong: 7b65d6a65095c36ba426124d67284244 != 35f3732db3f2cc4afdc68a8533b60a52
dateutil from upstream source is invalid: http://www.labix.org/download/python-dateutil/python-dateutil-1.5.tar.gz

我找到日历服务器的源代码,找到下面的代码(https://github.com/trevor/calendarserver/blob/master/support/build.sh): check_hash () { 本地文件="$1";换档;

    local sum="$(md5 "${file}" | perl -pe 's|^.*([0-9a-f]{32}).*$|\1|')";
    if [ -n "${md5}" ]; then
      echo "Checking MD5 sum for ${name}...";
      if [ "${md5}" != "${sum}" ]; then
        echo "ERROR: MD5 sum for downloaded file is wrong: ${sum} != ${md5}";
        return 1;
      fi;
    else
      echo "MD5 sum for ${name} is ${sum}";
    fi;

    local sum="$(sha1 "${file}" | perl -pe 's|^.*([0-9a-f]{40}).*$|\1|')";
    if [ -n "${sha1}" ]; then
      echo "Checking SHA1 sum for ${name}...";
      if [ "${sha1}" != "${sum}" ]; then
        echo "ERROR: SHA1 sum for downloaded file is wrong: ${sum} != ${sha1}";
        return 1;
      fi;
    else
      echo "SHA1 sum for ${name} is ${sum}";
    fi;
  }

有人知道如何解决这个问题吗? 我无法从谷歌找到任何有用的页面。

【问题讨论】:

    标签: python calendar darwin python-dateutil


    【解决方案1】:

    看起来下载的文件确实已损坏。这是我在这里下载得到的md5sum:

    % wget -q http://www.labix.org/download/python-dateutil/python-dateutil-1.5.tar.gz                                                              
    % md5sum python-dateutil-1.5.tar.gz
    35f3732db3f2cc4afdc68a8533b60a52  python-dateutil-1.5.tar.gz
    

    也许再试一次?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-15
      • 2014-04-06
      • 2018-06-13
      • 2019-01-28
      • 1970-01-01
      • 2015-02-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多