无法在代码服务器上安装 python 扩展
我在 ubuntu 基础映像上使用以下命令安装 vscode 并尝试安装 python 扩展,但出现错误。
ARG IDE_HOME="/opt"
ARG CODE_SERVER_VERSION="v3.11.1"
ARG CODE_SERVER_FILE="code-server-3.11.1-linux-amd64.tar.gz"
WORKDIR $IDE_HOME/code-server/
RUN wget -qO- https://github.com/cdr/code-server/releases/download/${CODE_SERVER_VERSION}/${CODE_SERVER_FILE} | tar zxvf - --strip-components=1
ENV PATH=$IDE_HOME/code-server/bin:$PATH
RUN code-server --install-extension ms-python.python
错误:
[2022-03-24T06:01:24.303Z] info Wrote default config file to ~/.config/code-server/config.yaml
Installing extensions...
Server returned 404
[2022-03-24T06:01:29.030Z] error vscode Failed Installing Extensions: ms-python.python
[2022-03-24T06:01:29.032Z] error vscode Error: Failed Installing Extensions: ms-python.python
at L.installExtensions (/opt/code-server/lib/vscode/out/vs/server/entry.js:19:42)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /opt/code-server/lib/vscode/out/vs/server/entry.js:41:86115
at async Object.T [as main] (/opt/code-server/lib/vscode/out/vs/server/entry.js:41:89502)
at async process.<anonymous> (/opt/code-server/lib/vscode/out/vs/server/entry.js:41:99068)
The command '/bin/sh -c code-server --install-extension ms-python.python' returned a non-zero code: 1
I am install vscode using the below commands on ubuntu base image and trying to install python extension and it gets an error.
ARG IDE_HOME="/opt"
ARG CODE_SERVER_VERSION="v3.11.1"
ARG CODE_SERVER_FILE="code-server-3.11.1-linux-amd64.tar.gz"
WORKDIR $IDE_HOME/code-server/
RUN wget -qO- https://github.com/cdr/code-server/releases/download/${CODE_SERVER_VERSION}/${CODE_SERVER_FILE} | tar zxvf - --strip-components=1
ENV PATH=$IDE_HOME/code-server/bin:$PATH
RUN code-server --install-extension ms-python.python
Error:
[2022-03-24T06:01:24.303Z] info Wrote default config file to ~/.config/code-server/config.yaml
Installing extensions...
Server returned 404
[2022-03-24T06:01:29.030Z] error vscode Failed Installing Extensions: ms-python.python
[2022-03-24T06:01:29.032Z] error vscode Error: Failed Installing Extensions: ms-python.python
at L.installExtensions (/opt/code-server/lib/vscode/out/vs/server/entry.js:19:42)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /opt/code-server/lib/vscode/out/vs/server/entry.js:41:86115
at async Object.T [as main] (/opt/code-server/lib/vscode/out/vs/server/entry.js:41:89502)
at async process.<anonymous> (/opt/code-server/lib/vscode/out/vs/server/entry.js:41:99068)
The command '/bin/sh -c code-server --install-extension ms-python.python' returned a non-zero code: 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论