Skip to content

rustup update fails because of missing directory #938

Closed

Description

@rnestler

I tried running rustup update today and it failed to update rust-std-i686-pc-windows-gnu:

C:\Users\rnestler>rustup update
info: syncing channel updates for 'stable-i686-pc-windows-gnu'
info: downloading component 'rustc'
 36.8 MiB /  36.8 MiB (100 %)   4.2 MiB/s ETA:   0 s
info: downloading component 'rust-std'
 51.5 MiB /  51.5 MiB (100 %)   7.9 MiB/s ETA:   0 s
info: downloading component 'cargo'
  4.1 MiB /   4.1 MiB (100 %) 608.9 KiB/s ETA:   0 s
info: downloading component 'rust-mingw'
  6.8 MiB /   6.8 MiB (100 %)   1.1 MiB/s ETA:   0 s
info: downloading component 'rust-docs'
  6.9 MiB /   6.9 MiB (100 %)   1.3 MiB/s ETA:   0 s
info: rolling back changes
error: failure removing component 'rust-std-i686-pc-windows-gnu', directory does not exist: '"lib/rustlib/i686-pc-windows-gnu/lib/log-f5a209a9.dll"'
info: syncing channel updates for 'stable-x86_64-pc-windows-gnu'
info: downloading component 'rustc'
 36.0 MiB /  36.0 MiB (100 %)   5.4 MiB/s ETA:   0 s
info: downloading component 'rust-std'
 51.0 MiB /  51.0 MiB (100 %)   5.5 MiB/s ETA:   0 s
info: downloading component 'cargo'
info: downloading component 'rust-mingw'
info: downloading component 'rust-docs'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-mingw'
info: installing component 'rust-docs'
warning: could not delete temp directory: C:\Users\rnestler\.rustup\tmp\3akg3kw0lf844hq0_dir
info: syncing channel updates for 'nightly-i686-pc-windows-gnu'
info: checking for self-updates

  stable-i686-pc-windows-gnu update failed - rustc 1.14.0 (e8a012324 2016-12-16)
      stable-x86_64-pc-windows-gnu updated - rustc 1.15.0 (10893a9a3 2017-01-19)
     nightly-i686-pc-windows-gnu unchanged - (error reading rustc version)

Also for the nightly version an error window pops up:
2017-02-03 11_09_16-rustc exe - system error

Activity

  1. rnestler commented on Feb 20, 2017

    @rnestler
    Author

    I could solve it by deleting both nightly-i686-pc-windows-gnu and stable-i686-pc-windows-gnu from %HOME%\.multirust\toolchains.

  2. brson commented on Mar 16, 2017

    @brson
    Contributor

    Thanks for the report @rnestler. I have no idea what's going on here offhand, but I'm sorry your toolchains got hosed.

  3. lamarqua commented on Mar 17, 2017

    @lamarqua

    I've been getting this error consistently for a few months. Usually the toolchain updates just fine (that is, it seems to be functional), but I'm always getting the error messages. e.g.:

    λ rustup update
    info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
    info: downloading component 'rustc'
     28.8 MiB /  28.8 MiB (100 %)  96.0 KiB/s ETA:   0 s
    info: downloading component 'rust-std'
    error: component download failed for rust-std-x86_64-pc-windows-msvc
    info: syncing channel updates for 'beta-x86_64-pc-windows-msvc'
     17.5 MiB /  89 B (20672452 %) 137.6 KiB/s ETA: -131 s
    info: downloading component 'rustc'
     33.2 MiB /  33.2 MiB (100 %) 105.6 KiB/s ETA:   0 s
    info: downloading component 'rust-std'
     44.8 MiB /  44.8 MiB (100 %) 105.6 KiB/s ETA:   0 s
    info: downloading component 'cargo'
      2.9 MiB /   2.9 MiB (100 %)  96.0 KiB/s ETA:   0 s
    info: installing component 'rustc'
    info: installing component 'rust-std'
    info: installing component 'cargo'
    info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
    282.9 KiB / 282.9 KiB (100 %) 138.8 KiB/s ETA:   0 s
    info: downloading component 'rustc'
     33.2 MiB /  33.2 MiB (100 %) 121.6 KiB/s ETA:   0 s
    info: downloading component 'rust-std'
     44.8 MiB /  44.8 MiB (100 %) 208.0 KiB/s ETA:   0 s
    info: downloading component 'cargo'
      2.9 MiB /   2.9 MiB (100 %) 211.2 KiB/s ETA:   0 s
    info: downloading component 'rust-src'
     30.4 MiB /  30.4 MiB (100 %) 173.1 KiB/s ETA:   0 s
    info: installing component 'rustc'
    info: installing component 'rust-std'
    info: installing component 'cargo'
    info: installing component 'rust-src'
    info: checking for self-updates
    
      stable-x86_64-pc-windows-msvc update failed - (error reading rustc version)
              beta-x86_64-pc-windows-msvc updated - (error reading rustc version)
           nightly-x86_64-pc-windows-msvc updated - (error reading rustc version)
    

    (The update failure may have been due to my internet connection, which sometimes corrupts downloads.)

  4. Diggsey commented on Mar 17, 2017

    @Diggsey
    Contributor

    @rnestler
    This looks like an antivirus issue - something is removing the DLLs which rustup installs. This causes it to fail when it tries to update (by first removing the previous version) and also causes nightly to fail to start (missing DLL).

    If possible, my personal recommendation would be to only use microsoft security products. If that's not possible, see if you can adjust the settings to allow rustup to work correctly.

    @lamarqua That looks like a different problem. Are you installing 64-bit rust on a 32-bit system? It could appear to be working if you have a 32-bit version of rust earlier on your PATH.

  5. lamarqua commented on Mar 17, 2017

    @lamarqua

    Nope, I'm running 64-bits windows 7 pro. I don't even think I've ever had a 32-bits rust version installed on this machine. (A search for rustc.exe on my machine gives none other than the stable / beta / nightly triad installed via rustup.)

    I re-ran rustup update after the failure, but this time, after having ran VsDevCmd.bat (which is basically the equivalent of vcvarsall.bat, but for the new Visual Studio 2017 which I've been using):

    λ rustup update
    info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
    info: downloading component 'rustc'
     28.8 MiB /  28.8 MiB (100 %) 182.4 KiB/s ETA:   0 s
    info: downloading component 'rust-std'
     40.0 MiB /  40.0 MiB (100 %) 198.4 KiB/s ETA:   0 s
    info: downloading component 'cargo'
      2.7 MiB /   2.7 MiB (100 %) 112.0 KiB/s ETA:   0 s
    info: downloading component 'rust-docs'
      7.1 MiB /   7.1 MiB (100 %) 108.8 KiB/s ETA:   0 s
    info: installing component 'rustc'
    info: installing component 'rust-std'
    info: installing component 'cargo'
    info: installing component 'rust-docs'
    warning: could not delete temp directory: C:\Users\Adrien\.rustup\tmp\czm
    l741ao8ic2w1a_dir
    info: syncing channel updates for 'beta-x86_64-pc-windows-msvc'
    info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
    info: checking for self-updates
    
         stable-x86_64-pc-windows-msvc updated - rustc 1.16.0 (30cf806ef 2017
    -03-10)
         beta-x86_64-pc-windows-msvc unchanged - rustc 1.17.0-beta.1 (408d49e
    60 2017-03-14)
      nightly-x86_64-pc-windows-msvc unchanged - rustc 1.17.0-nightly (0aeb9c
    129 2017-03-15)
    

    I didn't get any error message.

  6. Diggsey commented on Mar 17, 2017

    @Diggsey
    Contributor

    @lamarqua Ah yes, rust doesn't automatically detect Visual Studio 2017 yet, so you need to run vcvarsall.bat. This is a rust issue, but I suspect @retep998 is already working on this...

    It's surprising that rustc --version (the command rustup runs) crashes though.

  7. lamarqua commented on Mar 18, 2017

    @lamarqua

    Yeah, it's weird, because it doesn't crash when I run it from the command line, even when I don't run vcvarsall.

    E:\Home 
    λ rustc --version
    rustc 1.17.0-nightly (0aeb9c129 2017-03-15)
    
    E:\Home 
    λ which cl.exe
    which: no cl.exe in (...)
    

    It only ever crashes (showing a MessageBox) when I run rustup update.

  8. Diggsey commented on May 3, 2017

    @Diggsey
    Contributor

    I'm closing this (the missing DLL issue) because if, as I suspect, it's caused by a virus scanner deleting DLLs, there is nothing we can really do about it.

    @lamarqua If you are still having problems please open a separate issue.

  9. lesichkovm commented on Jun 15, 2017

    @lesichkovm

    Issue still on:

    $ rustup update stable
    info: syncing channel updates for 'stable-x86_64-apple-darwin'
    info: downloading component 'rustc'
    37.8 MiB / 37.8 MiB (100 %) 10.2 MiB/s ETA: 0 s
    info: downloading component 'rust-std'
    53.8 MiB / 53.8 MiB (100 %) 10.2 MiB/s ETA: 0 s
    info: downloading component 'cargo'
    3.6 MiB / 3.6 MiB (100 %) 799.6 KiB/s ETA: 0 s
    info: downloading component 'rust-docs'
    11.4 MiB / 11.4 MiB (100 %) 11.1 MiB/s ETA: 0 s
    info: downloading component 'rust-src'
    31.9 MiB / 31.9 MiB (100 %) 10.5 MiB/s ETA: 0 s
    info: rolling back changes
    error: failure removing component 'rust-src', directory does not exist: '"lib/rustlib/src/rust/src/llvm/test/tools/llvm-objdump/X86/Inputs/internal.exe.coff-x86_64"'

  10. lesichkovm commented on Jun 15, 2017

    @lesichkovm

    Opened new issue on: #1167

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions