如果你使用了clangd插件,发现无法下载需要的clangd包,弹出以下报错:
Failed to install clangd language server: FetchError: request to
https://objects.githubusercontent.com/github-production-release-asset-2e65be/165743148/84faf9d2-7933-4d93-a8e0-c5d16d301feb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230622%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230622T064644Z&X-Amz-Expires=300&X-Amz-Signature=ed7b3461d30f82d7989fa14e53a9fab8fe827f27d09d27cc90f30566377bb7bd&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=165743148&response-content-disposition=attachment%3B%20filename%3Dclangd-linux-16.0.2.zip&response-content-type=application%2Foctet-stream
failed, reason: connect ETIMEDOUT 185.199.111.133:443 You may want to
install it manually.
那么你可以根据网址(https://…Foctet-stream),先将包手动下载下来,解压复制粘贴到/usr/bin(或者你认为合适的其他目录)下。
然后在插件配置中,填入:
之后ctrl+shift+p,developer:reload window
就发现clangd正常运行了。