Skip to content

cant install on bash Xenial in Windows 10 #864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tyoc213 opened this issue Dec 16, 2016 · 5 comments
Closed

cant install on bash Xenial in Windows 10 #864

tyoc213 opened this issue Dec 16, 2016 · 5 comments

Comments

@tyoc213
Copy link

tyoc213 commented Dec 16, 2016

I have installed rust on the previous version of bash for windows (which is a 14.06 LTS Ubuntu) and it did install correctly, now (Xenial 16.04 LTS) I get

info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: downloading component 'rustc'
 33.3 MiB /  33.3 MiB (100 %)  16.7 MiB/s ETA:   0 s
info: downloading component 'rust-std'
 40.6 MiB /  40.6 MiB (100 %)  17.9 MiB/s ETA:   0 s
info: downloading component 'rust-docs'
info: downloading component 'cargo'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'rust-docs'
info: rolling back changes
error: could not rename component directory from '/home/laila/.rustup/tmp/cjhsyltqd0s3i317_dir/bk' to '/home/laila/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu'
error: could not rename component directory from '/home/laila/.rustup/tmp/4b_vekx73u6z0k7l_dir/bk' to '/home/laila/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/man'
warning: could not delete temp directory: /home/laila/.rustup/tmp/rr3a5s4svixw4mw2_dir
error: failed to install component: 'rust-docs-x86_64-unknown-linux-gnu', detected conflict: '"share/doc/rust/html"'
rustup: command failed: /tmp/tmp.8UVDwWa2ZW/rustup-init

I can install cargo and rustc with ^sudo apt install

@jdub
Copy link

jdub commented Jan 6, 2017

rustup-init completes successfully on Ubuntu 16.04 LTS under Windows 10 build 14986, an Insider Preview release:

jdub@sliver:~$ curl -O https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 9500k  100 9500k    0     0  1153k      0  0:00:08  0:00:08 --:--:-- 1504k

jdub@sliver:~$ file rustup-init
rustup-init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.9, not stripped

jdub@sliver:~$ chmod +x rustup-init

jdub@sliver:~$ ./rustup-init --version
rustup-init 1.0.0 (17b6d21 2016-12-15)

jdub@sliver:~$ ./rustup-init --no-modify-path -y
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: downloading component 'rustc'
 47.1 MiB /  47.1 MiB (100 %)   1.1 MiB/s ETA:   0 s
info: downloading component 'rust-std'
 56.8 MiB /  56.8 MiB (100 %)   1.5 MiB/s ETA:   0 s
info: downloading component 'cargo'
  4.0 MiB /   4.0 MiB (100 %) 794.4 KiB/s ETA:   0 s
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: default toolchain set to 'stable'

  stable installed - rustc 1.14.0 (e8a012324 2016-12-16)

rustup component add rust-docs completes successfully (albeit very slowly, c.f. #904, though my CPU is being smashed by the "Antimalware Service Executable"), though can't delete its temp directories:

jdub@sliver:~$ .cargo/bin/rustup component add rust-docs
info: downloading component 'rust-docs'
  9.4 MiB /   9.4 MiB (100 %)   1.5 MiB/s ETA:   0 s
info: installing component 'rust-docs'
warning: could not delete temp directory: /home/jdub/.rustup/tmp/yxysh3m5z6nqmwbn_dir

Let's try that again with --verbose:

jdub@sliver:~$ .cargo/bin/rustup --verbose component add rust-docs
verbose: read metadata version: '12'
info: downloading component 'rust-docs'
verbose: creating temp file: /home/jdub/.rustup/tmp/763s_xkqn88_z58u_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/2016-12-21/rust-docs-1.14.0-x86_64-unknown-linux-gnu.tar.gz'
verbose: downloading with curl
  9.4 MiB /   9.4 MiB (100 %)   1.5 MiB/s ETA:   0 s
verbose: checksum passed
info: installing component 'rust-docs'
verbose: creating temp directory: /home/jdub/.rustup/tmp/3v7v6n0p6013hydo_dir
# note: 99% of the time spent installing was spent here
verbose: creating temp file: /home/jdub/.rustup/tmp/0usmpuc_efm1muwf_file
verbose: creating temp file: /home/jdub/.rustup/tmp/vbgrea77pkduzc46_file
warning: could not delete temp directory: /home/jdub/.rustup/tmp/3v7v6n0p6013hydo_dir
verbose: deleted temp file: /home/jdub/.rustup/tmp/763s_xkqn88_z58u_file
verbose: creating temp file: /home/jdub/.rustup/tmp/k8716l1qrsxqrr32_file
verbose: creating temp file: /home/jdub/.rustup/tmp/guoxk3yftjt2hm5o_file
verbose: deleted temp file: /home/jdub/.rustup/tmp/0usmpuc_efm1muwf_file
verbose: deleted temp file: /home/jdub/.rustup/tmp/vbgrea77pkduzc46_file
verbose: deleted temp file: /home/jdub/.rustup/tmp/k8716l1qrsxqrr32_file
verbose: deleted temp file: /home/jdub/.rustup/tmp/guoxk3yftjt2hm5o_file

jdub@sliver:~$ .cargo/bin/rustup component list | grep docs
rust-docs-x86_64-unknown-linux-gnu (installed)

jdub@sliver:~$ du -sh $(.cargo/bin/rustc --print sysroot)/share/doc/rust
98M     /home/jdub/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust

jdub@sliver:~$ ls -lh .rustup/tmp/
total 0
drwxr-xr-x 0 jdub jdub 0 Jan  7 02:21 3v7v6n0p6013hydo_dir

jdub@sliver:~$ du -sh .rustup/tmp/
69M     .rustup/tmp/

Bah, should've run it with time. Oh well. 😄

@fanyang89
Copy link

fanyang89 commented Feb 20, 2017

It seems that cannot install rustup in bash on Ubuntu on Windows correctly.
Windows 10 14986
Input:

$ curl https://sh.rustup.rs -sSf | sh -s

Ouput:

info: downloading installer
curl: ../sysdeps/posix/getaddrinfo.c:2603:getaddrinfo: Assertion ‘IN6_IS_ADDR_V4MAPPED (sin6->sin6_addr.s6_addr32)’ failed.
Aborted (core dumped)
rustup: command failed: curl -sSfL https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init -o /tmp
/tmp.vDnemRar7t/rustup-init

@hdznrrd
Copy link

hdznrrd commented Mar 5, 2018

I'm seeing potentially similar behavior with rustup update running inside a docker container based on arm42v7/debian:stretch-slim itself running on an RaspberryPi 3.

Full log: rustup_arm_error.txt
Excerpt:

verbose: creating temp directory: /root/.rustup/tmp/l0a9w95vem0cyv22_dir
verbose: deleted temp directory: /root/.rustup/tmp/l0a9w95vem0cyv22_dir
info: rolling back changes
error: could not rename component directory from '/root/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/etc' to '/root/.rustup/tmp/l0a9w95vem0cyv22_dir/bk'
# rustup --version
rustup 1.11.0 (e751ff9f8 2018-02-13)

@mati865
Copy link
Contributor

mati865 commented Mar 3, 2019

Rustup works fine in WSL on Windows 10 1809, this issue should be closed.

@kinnison
Copy link
Contributor

kinnison commented Mar 3, 2019

Thanks @mati865

@kinnison kinnison closed this as completed Mar 3, 2019
@rust-lang rust-lang locked as resolved and limited conversation to collaborators Aug 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants