gitpod-io / workspace-images

Ready to use docker images for Gitpod workspaces
https://hub.docker.com/u/gitpod
MIT License
481 stars 321 forks source link

rustup not working #933

Open gengjiawen opened 2 years ago

gengjiawen commented 2 years ago

Bug description

rustup not working by default.

Steps to reproduce

gitpod /workspace/wu (master) $ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2022-09-22, rust version 1.64.0 (a55dd71d5 2022-09-19)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rls'
info: downloading component 'rust-analysis'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: removing the previous version of component 'cargo'
info: rolling back changes
error: could not rename component file from '/home/gitpod/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/libexec' to '/home/gitpod/.rustup/tmp/mzgzn1hbowybky0h_dir/bk'
info: checking for self-updates

  stable-x86_64-unknown-linux-gnu update failed - rustc 1.63.0 (4b91a6ea7 2022-08-08)

info: cleaning up downloads & tmp directories

Expected behavior

No response

Example repository

No response

Anything else?

No response

BaoAn21 commented 2 years ago

I ran rustup update stable, and it did not work either

c3potheds commented 2 years ago

+1, this is the issue that prompted #930

c3potheds commented 2 years ago

My workaround currently is to invoke:

rustup self uninstall
rm -rf .rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

... and then manually re-run the prebuild commands (e.g. cargo build, cargo install cargo-nextest).

If the resolution to #930 still isn't taking effect after a while I'll look into figuring out how to put all of this in the prebuild initializer.