Skip to content

Rustup cannot download hash file for toolchains channel information under Wine #3689

Description

@llde

Problem

Hi, When trying to install a MSVC toolchain using Rustup under wine (x64 and x86 rustup versions for windows affected) it fails with this error:

error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to 'C:\users\lorenzo\.rustup\tmp\scoucda6ta418hod_file': failed to make network request: error sending request for url (https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256): operation timed out: operation timed out

I did see this error seems to happen also on different platforms, but it's consistent on Wine. It's possible that it's not a specific wine deficiency, but worse performance under wine (socket performances are not on par with windows, expecially asyncronous and non blocking ones) are making the problem manifest.
I can download toolchains from the native linux rustup, however it's easier to be able to manage the msvc rust toolchain inside the Wine Prefix where Visual Studio 2019 and the C++ Build tools are installed

RUSTUP_USE_CURL=1 is a workaround, and allow rustup to properly download

Thanks for the attention

Steps

  1. export WINEPREFIX="(PAth for VS wine prefix)"
  2. wine rustup-init.exe
  3. Press enter and wait

Possible Solution(s)

RUSTUP_USE_CURL=1 is a workaround

Notes

Wine, Wine-Staging and Wine-TKG affected. Problem existed in wine 7.x

Rustup version

1.26.0  (but this problem existed in all previous version for some years)

Installed toolchains

None

Activity

  1. djc commented on Mar 6, 2024

    @djc
    Contributor

    Reported this as a reqwest issue: seanmonstar/reqwest#2158.

  2. llde commented on May 4, 2024

    @llde
    Author

    RUSTUP_USE_RUSTLS=1 seems to be another workaround with last rustup version. Without any envvars setted problems still persist
    @djc

  3. rami3l commented on May 4, 2024

    @rami3l
    Member

    RUSTUP_USE_RUSTLS=1 seems to be another workaround with last rustup version. Without any envvars setted problems still persist

    @llde That kinda makes sense since the current default is to use Windows' own TLS stack, and I have no idea if that works well under Wine or not...

  4. added
    not-rustupWhatever is described in this issue isn't Rustup's fault
    dependenciesThe issue is caused by rustup's dependencies.
    and removed
    not-rustupWhatever is described in this issue isn't Rustup's fault
    on May 13, 2024
  5. rami3l commented on Mar 20, 2026

    @rami3l
    Member

    @djc I think since we've been using rustls by default for a while, plus the positive report regaring its use in Wine such as #4748 in rustup v1.28, we can safely close this issue as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdependenciesThe issue is caused by rustup's dependencies.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions