toolchain "stable-x86_64-unknown-linux-gnu" is not installable
Verification
- [X] I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue+is%3Aopen%2Cclosed and found no duplicates.
- [X] I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.
Problem
Hi,
My bug occurs when using the command "rustup default stable".
rustup default stable
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: update not yet available, sorry! try again later
error: toolchain 'stable-x86_64-unknown-linux-gnu' is not installable
T0301518@W604431:~/projet_stage/switchctrl_rust (master #)$ rustup --verbose toolchain install --force stable
verbose: read metadata version: '12'
verbose: installing toolchain 'stable-x86_64-unknown-linux-gnu'
verbose: toolchain directory: '/users/T0301518/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
verbose: creating temp file: /users/T0301518/.rustup/tmp/zg3wk2z9s5h3ep5g_file
verbose: downloading file from: 'https://t0301518:cmVmdGtuOjAxOjE3NDk2NTA3NjQ6SlVhT1p3a3lnb2xmNjZKSFNuaDA2ZFlOOThK@artifactory.thalesdigital.io/ui/repos/tree/General/cargo-external/dist/channel-rust-stable.toml.sha256'
verbose: downloading with curl
verbose: deleted temp file: /users/T0301518/.rustup/tmp/zg3wk2z9s5h3ep5g_file
verbose: no update hash at: '/users/T0301518/.rustup/update-hashes/stable-x86_64-unknown-linux-gnu'
verbose: creating temp file: /users/T0301518/.rustup/tmp/prfg38jg21h320wm_file.toml
verbose: downloading file from: 'https://t0301518:cmVmdGtuOjAxOjE3NDk2NTA3NjQ6SlVhT1p3a3lnb2xmNjZKSFNuaDA2ZFlOOThK@artifactory.thalesdigital.io/ui/repos/tree/General/cargo-external/dist/channel-rust-stable.toml'
verbose: downloading with curl
verbose: deleted temp file: /users/T0301518/.rustup/tmp/prfg38jg21h320wm_file.toml
info: update not yet available, sorry! try again later
verbose: toolchain is already up to date
error: toolchain 'stable-x86_64-unknown-linux-gnu' is not installable
rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /users/T0301518/.rustup
no active toolchain
As you may see, i'm trying to install the latest rust version. My rustup path is changed through a Artifactory path mirroring the official one through a proxy. What i don't understand is the "version is not installable" as if i don't have the rights or it can't connect to the repository. Can you please help me ?
Steps
- Set up a artifactory mirror to Rust depository
- Install rustup through rustup-init.sh (seems to be working)
- use "rustup default stable" or any other version install.
Possible Solution(s)
As i thought the problem may be two things :
- I didn't properly setup artifactory mirroring (but i can download rustup through .sh so weird)
- I don't have sudo privilegies (can't do anything about it sorry)
Notes
No response
Rustup version
rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
Installed toolchains
None
OS version
Redhat 7.3 x86_64
@Pierremalle Salut, and thanks for filing this issue!
The aforementioned error comes from here:
https://github.com/rust-lang/rustup/blob/1eb4de7b022d90578691d215859eec7cf2cedbce/src/dist/mod.rs#L1119-L1124
... which was introduced in #562 back in 2016 (!!). This message should indicate a checksum mismatch, however since this error is very rare, the last few lines of the expected error message have clearly gone missing over the years without anyone noticing until today:
[rust]$ rustup update info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu' info: update not yet available, sorry! try again later error: checksum failed, expected: 'afac5aec3145de8a551e930980045d4e7867c83aa5909246087e451bf0038aed', calculated: 'd411ebefe2ceb819fc78423e0cc6425b05d84b5c370ad9aeb19bffea9949dd53' info: checking for self-updates nightly-x86_64-unknown-linux-gnu update failed - rustc 1.15.0-nightly (ba872f270 2016-11-17)
https://github.com/rust-lang/rustup/issues/524#issuecomment-262680769
Unless indicated otherwise, I suspect this would have something to do with the upstream release server(s) (the one within Thales rather than the official one), see #346 for more context on this.
That said, it seems reasonable for us to make the error message clearer so that you might feel lost less often.
Can confirm that somehow the output has deviated from the expected one in the v1.27 series: https://github.com/rust-lang/rustup/issues/3390#issue-1769892073.
Thank you a lot. i'll check that with Artifactory. Since i changed instance due to a network problem i must have forgotten to regenerate a API token so it just don't find me.
Want me to consider this as close or keep that feed until i can make it work in case of anything ? Thanks again.
Want me to consider this as close or keep that feed until i can make it work in case of anything ? Thanks again.
@Pierremalle I'd like to leave it open to track the missing output that made you confused :)
Oh, it begins to be fun.
i've looked at Artifactory configuration. I regenerated an API key and verified the proxy. I can curl the page, however, i face a HTTP 304 code from the source which probably means that my Artifactory is somehow messed up.
I'll tell more when i find more about it.
Well, as it turned out.
The first error message was coming from the fact that my artifactory path to RUSTUP_UPDATE_ROOT didn't exist.
Despite that i can't make Rustup work through Artifactory since :
- It uses curl but without the power of deactivate SSL check, seems fair.
- The way rustup download rust by using the official site as his own repo would mean that we need to mirror the entire site which is hard to keep in security condition.
After asking to a senior dev knowing a bit more with Artifactory, he basically told me : Ask to sys admin to do it for you (not kind) Build rust from source.
So i think my next move will be to force it with the rust standalone version or with the sources and link anything needed.
Wish me luck lads.
@Pierremalle Wait, you're still on the curl backend? We've been on reqwest by default since a while ago now and we're planning to move to reqwest+rustls (https://github.com/rust-lang/rustup/issues/3806). Is there a particular reason for still using curl?
Hmmm if you need to install Rust manually, maybe you can still use Rustup with the instructions in https://rust-lang.github.io/rustup/installation/already-installed-rust.html.
No not really. I was taking an example from a procedure to install Rust on Windows that supposedly work, and yes it sounds weird now that i say it 🤔
But doesn't the problem would be the same if i'm with curl or reqwest ? Both check SSL no ?
@Pierremalle You're right. I've made the following update to the error messages nonetheless:
Before
info: syncing channel updates for 'nightly-aarch64-apple-darwin'
info: update not yet available, sorry! try again later
error: toolchain 'nightly-aarch64-apple-darwin' is not installable
After
info: syncing channel updates for 'nightly-aarch64-apple-darwin'
warn: checksum failed for <SNIP>, expected: 'aaaaaaaaaa0f87d2df5e0cff356df307b6649a7b0b4effdf4b6dbd15070206de', calculated: '907f97b96e0f87d2df5e0cff356df307b6649a7b0b4effdf4b6dbd15070206de'
info: if you are on the official release server, this is most likely due to an update happening right now, please try again later
info: if you are on a third-party release server, this might indicate a problem with the server's configuration
error: toolchain 'nightly-aarch64-apple-darwin' is not installable
I'll make this a PR real soon.