vcpkg经常会遇到资源无法访问,可能是域名解析出了问题,我们只需要将域名解析后的ip地址添加到hosts文件列表中可解决此问题,如:
185.199.108.133 raw.githubusercontent.com
在此之前可先通过终端ping指令验证一下。
linux系统中,hosts文件路径:/etc/hosts
windows系统中,hosts文件路径:c:\windows\system32\drivers\etc\hosts
域名解析,可通过IPAddreIPAddress查询