`brew install` should tell which files couldn't be linked #18303

Closed
adamv opened this Issue Mar 7, 2013 · 8 comments

Comments

Projects
None yet
4 participants
Contributor

adamv commented Mar 7, 2013

Warning: Could not link git. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link git'

I shouldn't have to do brew link git to see which file failed; install should tell me.

(It is due to the completion monkeying around)

Contributor

adamv commented Mar 7, 2013

Error: Could not symlink file: /Users/adamv/homebrew/Cellar/git/1.8.1.5/etc/bash_completion.d/git-completion.bash
Target /usr/local/etc/bash_completion.d/git-completion.bash already exists. You may need to delete it.

So I guess we install in a way that conflicts with bash-completion now? Seems lame.

Contributor

urdh commented Mar 7, 2013

Yeah, I've been noticing this lately. I think there's a similar poblem with zsh stuff.

Owner

MikeMcQuaid commented Mar 7, 2013

Pretty sure this only occurs if you used a particular bad revision of Git in the past. Should be fixed for clean builds now. If there's anything obviously stupid we're doing though let me know.

Contributor

jacknagel commented Mar 7, 2013

I tagged this and some other brew link related issues. I'm sure everything would benefit from turning the error handling in Pathname#make_relative_symlink into real exceptions that the UX layer can manage.

Owner

MikeMcQuaid commented Mar 8, 2013

@adamv The main problem with this is we have a file we need to install into two different places.

Contributor

adamv commented Mar 13, 2013

@MikeMcQuaid that's what "cp" is for.

Owner

MikeMcQuaid commented Mar 13, 2013

@adamv That's what I've done here and it makes 😿

Contributor

adamv commented Jun 19, 2013

The conflicting file is show in verbose mode (or possibly verbose+debug) mode. Should still show in the normal case though:

$ brew install gsmartcontrol
==> Downloading http://download.berlios.de/gsmartcontrol/gsmartcontrol-0.8.7.tar.bz2
Already downloaded: /usr/local/homebrew-cache/gsmartcontrol-0.8.7.tar.bz2
==> Patching
patching file src/applib/cmdex_sync_gui.cpp
patching file src/gsc_init.cpp
==> ./configure --prefix=/Users/vandenbe/brew/Cellar/gsmartcontrol/0.8.7
==> make
==> make install
Warning: Could not link gsmartcontrol. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /Users/vandenbe/brew
You can try again using `brew link gsmartcontrol'
==> Summary
/Users/vandenbe/brew/Cellar/gsmartcontrol/0.8.7: 42 files, 2.6M, built in 38 seconds

adamv closed this in d8d41cc Jun 24, 2013

@handyman5 handyman5 pushed a commit to handyman5/homebrew that referenced this issue Oct 7, 2013

@adamv adamv Show conflicting files on install if linking fails
Closes #18303.
Closes #20726.
bf12725

xu-cheng locked and limited conversation to collaborators Feb 16, 2016

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