在编译Rust源程序时,可能会出现如下 Couldn't resolve host name (Could not resolve host: crates) 错误(见 https://github.com/ustclug/discussions/issues/294)。

root $ cargo check
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)Downloaded actix-http v1.0.1 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)Downloaded async-trait v0.1.30 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)Downloaded chrono v0.4.11 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
error: failed to download from `https://crates-io.proxy.ustclug.org/api/v1/crates/futures-macro/0.3.4/download`Caused by:[6] Couldn't resolve host name (Could not resolve host: crates)

一个临时的解决方法是在运行 cargo 的时候加入环境变量 CARGO_HTTP_MULTIPLEXING=false。作用是取消并行下载。具体原因可参考用了镜像之后构建rustc报错。

Rust编译`Couldn‘t resolve host name (Could not resolve host: crates)` 错误的解决办法相关推荐

  1. android.mk 编译32位_C/C++初学者常见编译错误及其解决办法

    用户在C/C++集成开发环境(例如 Dev-C++)中编辑了源代码,执行编译之后,常常会因为源代码中存在问题而出现编译错误(它们会显示在编译窗口中).初学者常常会面对这些错误而不知如何处理.本文下面列 ...

  2. cocos2d-x-2.2中编译cocos2d-win32.vc2010.sln出现:C1083 pthread.h No such file or director错误的解决办法

    cocos2d-x-2.2中编译cocos2d-win32.vc2010.sln出现:C1083 pthread.h No such file or director错误的解决办法 打开cocos2d ...

  3. php5编译安装常见错误和解决办法集锦

    最近在给开发同事折腾开发测试环境,其中就有 php 的编译安装.由于每个人的需求不一致,所以也接触到了各种模块编译和集成,中间不乏各种编译依赖报错. 正好,搜了几次都是下面 2 篇文章内容,干脆就转到 ...

  4. php源码安装失败,php编译安装常见错误及解决办法

    php编译安装常见错误及解决办法 1.configure: error: No curses/termcap library found 网上有的说法是:–with-named-curses-libs ...

  5. [log]Can't resolve 'sass-loader' in...错误的解决办法

    Can't resolve 'sass-loader' in...错误的解决办法 Module not found: Error: Can't resolve 'sass-loader' in *** ...

  6. Impala编译错误及解决办法汇总

    Impala编译错误及解决办法汇总 Impala repo里有C++.Java.Python.Bash的代码,编译过程中可能遇到各种问题.这个文章将作为一个汇总,以后每遇到一个编译问题,解决完后都会更 ...

  7. ffmpeg库编译加文字_使用ffmpeg库编译错误及解决办法

    一.FFmpeg源代码下载与编译 # wget http://www.ffmpeg.org/releases/ffmpeg-0.5.13.tar.bz2 # tar -jxvf ffmpeg-0.5. ...

  8. PHP安装编译错误及解决办法

    今天搭建LAMP环境是编译PHP时出现的错误汇总. 错误: configure: error: xml2-config not found. Please check your libxml2 ins ...

  9. crosstool-ng 编译交叉工具链的常见错误及解决办法

    1.配置crosstool-ng产生的错误 1.1 ncurses headers files were not found Checking for 'ncurses/ncurses.h'... n ...

最新文章

  1. c#写图像tif gdal_C# GDAL显示TIF
  2. 工作177:表单重置项目处理
  3. 如图所示是一种轧钢计算机控制系统,高速线材厂轧钢工艺培训(活套)
  4. Java生产环境下性能监控与调优详解 第2章 基于JDK命令行工具的监控
  5. “请求未在nginx中配置的域名时,给浏览器返回508错误码”配置示例
  6. @Autowired @Qualifier
  7. 构建smaba服务器
  8. rsync 服务端和客户端 简单配置
  9. 根据crash学习用户空间程序内存布局
  10. C# 删除DataTable中的空行
  11. Linux从入门到精通——基础篇
  12. 基于C++的简易的国际象棋双人对战程序设计
  13. Python3.7+tkinter实现身高计算器
  14. qt html转pdf 怎么取消页码,更改或删除QPrintPreviewWidg中的页码
  15. mipi_dsi 接口转 lvds显示(GM8775C)
  16. 【Try to Hack】veil-evasion免杀
  17. 网络共享计算机无法登录,局域网共享文件夹访问无法出现用户登陆窗口怎么办?...
  18. 计算机视觉 — Harris角点检测
  19. 计算机设备名称在哪里找,如何查看电脑驱动
  20. 通过freemarker模板,使用jsoup将html转换为word,包含图片

热门文章

  1. 最后期限Lite,兴趣社区圈子论坛小程序前后端
  2. 【二】Centos 7.6下载与安装
  3. 801-分享“入选腾讯犀牛鸟精英营”心得
  4. cocos creater 使用.max文件/.max文件转换为.fbx文件
  5. 基于springboot+bootstrap+mysql+redis搭建一套完整的权限架构【八】【完善整个项目】
  6. c#通配符匹配符合条件文件名
  7. C语言从入门到精通第17天(指针和数组联用)
  8. 用ASP.NET创建网络相册
  9. 计算机服务flash,Flash Player右下角弹广告flash helper service解决教程
  10. oracle OCP考点在哪,OracleOCP认证要通过哪些考试