vscode: Downloading package ‘C/C++ language components (Linux / x86_64)‘ Failed.

使用vscode远程连接docker容器,进入容器后报错

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Linux / x86_64)'  Failed. Retrying... Failed. Retrying... Failed. Retrying...Waiting 8 seconds... Failed. Retrying...Waiting 15 seconds... Failed. Retrying...Waiting 15 seconds... Failed. Retrying...Waiting 15 seconds... Failed. Retrying...Waiting 15 seconds... Failed. Retrying...Waiting 15 seconds... Failed. Retrying...Waiting 15 seconds... Failed to download https://go.microsoft.com/fwlink/?linkid=2175018
Failed at stage: downloadPackages
Error: Failed to establish a socket connection to proxies: ["PROXY 127.0.0.1:8889"]

If you work in an offline environment or repeatedly see this error, try downloading a version of the extension with all the dependencies pre-included from https://github.com/microsoft/vscode-cpptools/releases, then use the "Install from VSIX" command in VS Code to install it.

打开报错提示中的网站,下载文件cpptools-linux.vsix
在这里插入图片描述
下载完成之后,重新启动容器,记得将软件所在位置映射到容器中(我使用-v /home/aviana/Downloads:/root/data将文件所在地址映射到了容器内部/root/data)),在vscode中选中扩展插件,点击...,选择Install from VSIX...
在这里插入图片描述然后选择下载的文件(容器内部地址/root/data)

在这里插入图片描述

安装完成。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值