使用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 )
安装完成。
|