rust-lang / rust-installer

The Bourne shell installer used by Rust and Cargo
Apache License 2.0
61 stars 68 forks source link

Installation fails when haskell platform is installed #36

Open brson opened 9 years ago

brson commented 9 years ago

@flip111 reported this bizarre problem.

» curl -sSf https://static.rust-lang.org/rustup.sh | sh                                              [18:54:40]

Welcome to Rust.

This script will download the Rust compiler and its package manager, Cargo, and
install them to /usr/local. You may install elsewhere by running this script
with the --prefix=<path> option.

The installer will run under 'sudo' and may ask you for your password. If you do
not want the script to run 'sudo' then pass it the --disable-sudo flag.

You may uninstall later by running /usr/local/lib/rustlib/uninstall.sh,
or by running this script again with the --uninstall flag.

Continue? (y/N) y

rustup: gpg available. signatures will be verified
rustup: downloading manifest for 'stable'
rustup: downloading toolchain for 'stable'
######################################################################## 100.0%
gpg: assuming signed data in `/home/ph88/.rustup/dl/e9ae934beb64de1168b5/rust-1.0.0-x86_64-unknown-linux-gnu.tar.gz'
gpg: Signature made Thu 14 May 2015 12:26:24 PM CEST using RSA key ID 7B3B09DC
gpg: Good signature from "Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 108F 6620 5EAE B0AA A8DD  5E1C 85AB 96E6 FA1B E5FE
     Subkey fingerprint: C134 66B7 E169 A085 1886  3216 5CB4 A934 7B3B 09DC
rustup: extracting installer
rustup: installing toolchain for 'stable'
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
mkdir: cannot create directory ‘/usr/local/share/man/man1’: File exists
install: error: directory creation failed. see logs at '/usr/local/lib/rustlib/install.log'
rustup: command failed: sudo sh /home/ph88/.rustup/tmp/tmp-30767-10/rust-1.0.0-x86_64-unknown-linux-gnu/install.sh --prefix=/usr/local
rustup: failed to install toolchain

The problem is that /usr/local/share/man/man1 is a symlink to a file:

13:11 <ph88> lrwxrwxrwx 1 root root 56 Jan 24 02:14 /usr/local/share/man/man1 -> /usr/local/haskell/ghc-7.8.3-x86_64/share/man/man1/ghc.1

Apparently the haskell platform did this. I'm a little confused why.

brson commented 9 years ago

Upstream ghc bug https://ghc.haskell.org/trac/ghc/ticket/10473#ticket

brson commented 9 years ago

rust-installer could possibly be defensive about this and run a sanity check that would catch it.

thomie commented 9 years ago

Upstream haskell-platform bug: https://github.com/haskell/haskell-platform/pull/137 There is a pull request there, but it hasn't been merged yet.

bananu7 commented 9 years ago

I wonder if it works the other way too, i.e. does having Rust installed prevent HP installation?

nuncanada commented 9 years ago

It seems both installers are doing something wrong...

brson commented 9 years ago

@bananu7 Rust creates the destination directory before installing so should not cause this kind of problem in the other direction.

Well, rather, Rust's install script works quite a bit differently than Haskell Platform so they are hard to compare.

mzero commented 9 years ago

The patch has now been merged and the next Platform release (this month) will have the fix.