由于EOS出新版本了,今天clone了最新版本,开始编译,之前编译的时候,也出现过MongoDB,及MongoDB相关编译工具,无法下载的问题。只能等到晚上网络状况比较好的时候,处理。今天,我们就针对这个问题,我们研究一下,如何出来。
问题提出
我们在编译EOS的时候,执行eosio_build.sh,编译一段时间后,出现如下问题。
Checking MongoDB installation.
MongoDB configuration found at /home/cuijb/opt/mongodb/mongod.conf.
Checking MongoDB C++ driver installation.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 617 0 617 0 0 869 0 --:--:-- --:--:-- --:--:-- 870
4 6193k 4 254k 0 0 1443 0 1:13:15 0:03:00 1:10:15 0
4 6193k 4 254k 0 0 628 0 2:48:19 0:06:54 2:41:25 0
curl: (56) GnuTLS recv error (-54): Error in the pull function.
gzip: stdin: unexpected end of file
tar: 归档文件中异常的 EOF
tar: 归档文件中异常的 EOF
tar: Error is not recoverable: exiting now
Unable to unarchive file /tmp/mongo-c-driver-1.10.2.tar.gz.
Exiting now.
反复几次,都是一样的问题。
我们就找找出现这个问题的编译脚本是怎么写的。分析一下。
打开eos/scripts目录下的eosio_build_ubuntu.sh
查询到这里是下载mongo-c-driver-1.10.2.tar.gz下载的地方
#STATUS=$( curl -LO -w '%{http_code}' --connect-timeout 30 https://github.com/mongodb/mongo-c-driver/releases/download/1.10.2/mongo-c-driver-1.10.2.tar.gz )
#if [ "${STATUS}" -ne 200 ]; then
# if ! rm -f "${TEMP_DIR}/mongo-c-driver-1.10.2.tar.gz"
# then
# printf "\\tUnable to remove file %s/mongo-c-driver-1.10.2.tar.gz.\\n" "${TEMP_DIR}"
# fi
# printf "\\tUnable to download MongoDB C driver at this time.\\n"
# printf "\\tExiting now.\\n\\n"
# exit 1;
#fi
我们先去网上,自行下载mongo-c-driver-1.10.2.tar.gz,然后将mongo-c-driver-1.10.2.tar.gz放到 /tmp/下。
下载地址:
https://github.com/mongodb/mongo-c-driver/releases/download/1.10.2/mongo-c-driver-1.10.2.tar.gz
然后注释掉eosio_build_ubuntu.sh脚本中上面那段话。
重新执行eosio_build.sh
问题搞定。
在编译的过程中,如果遇到其他无法下载的问题,也是如法炮制,就可以解决问题。希望可以帮到大家。谢谢
这次,我们真针对 Ubuntu16.04版本做处理,其他版本没有研究。
崔江保
2019年3月19日