0

When I set up Darwin Calendar Server, there is an error about download the 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

I find the source code of calendar sever and find the code below(https://github.com/trevor/calendarserver/blob/master/support/build.sh): check_hash () { local file="$1"; shift;

    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;
  }

Is there anybody know how to solve the problem? I could not find any useful page from google.

4

1 回答 1

0

看起来下载的文件确实已损坏。这是我在这里下载得到的 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

也许再试一次?

于 2013-09-04T19:16:41.887 回答