【OpenCR】在Arduino IDE下添加库

在根据OpenCR的手册上配置Windows端Arduino IDE时,添加OpenCR库的时候,会遇到的一个Error downloading:“https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/arduino/opencr_release/package_opencr_index.json”的问题,或者是中文条件下的:“下载 https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/arduino/opencr_release/package_opencr_index.json 时出错”。

这个问题的解决,我通过修改hosts文件来解决。

把下列内容复制粘贴到我们系统的host文件。host文件的地址是:C:\Windows\System32\drivers\etc\hosts

修改的时候可能会遇到打不开没有权限修改的现象,这个时候我们要先用管理员身份运行记事本,再在记事本打开hosts文件就可以修改了。

#github.com
199.232.69.194 github.global.ssl.Fastly.net
140.82.114.3 github.com
185.199.108.153 assets-cdn.github.com
185.199.109.153 assets-cdn.github.com
185.199.110.153 assets-cdn.github.com
185.199.111.153 assets-cdn.github.com
#opencr
185.199.108.133 raw.githubusercontent.com
185.199.109.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.111.133 raw.githubusercontent.com

其实修改hosts文件以后,为了以防万一,我还使用了某些上网方法作为保险手段。

如果修改hosts文件并不能很好的解决问题的话,大家还可以自行搜索某些上网相关的内容。

我是通过这两步解决error downloading的问题,当然在下载的过程中也会遇到某个具体的文件下载错误,这个时候就重复点几次install就好了。

posted @ 2022-01-23 09:41  墩墩蹲  阅读(478)  评论(0)    收藏  举报