Ran into errors while running dotfile install because of already existing package installs of heroku and qt

Hey there,

I have 2 main errors to deal with the dotfile install. (They mostly have to do with existing installs from when I may have tried installing some packages on my mac before.)

The first error was an issue with /usr/local/bin/heroku already existing, so I ran rm '/usr/local/bin/heroku' as it suggested (I didn’t run anything else after that.) Just wondering the best next best course of action, since it sounds like I still need to symlink bin/heroku with another directory (by doing brew link --overwrite heroku as it suggests?). Full error below:

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/heroku
Target /usr/local/bin/heroku
already exists. You may want to remove it:
  rm '/usr/local/bin/heroku'

To force the link and overwrite all conflicting files:
  brew link --overwrite heroku

To list all files that would be deleted:
  brew link --overwrite --dry-run heroku

Possible conflicting files are:
/usr/local/bin/heroku -> /usr/local/heroku/bin/heroku
==> Summary
🍺  /usr/local/Cellar/heroku/5.6.28-2643c0a: 7,361 files, 68.3MB, built in 44 seconds

The next error is qt5 5.8.0_1 is keg-only and another version is linked to opt (the dotfile installer recommended: Use brew install --force if you want to install this version) and that heroku-5.6.28-2643c0a already installed, it’s just not linked.

I don’t care about any old versions I have, they can be removed/deleted. To resolve these errors which commands should I run? Full error of qt and heroku issue below:

🍺  /usr/local/Cellar/qt5/5.8.0_1: 8,667 files, 247.9MB
Error: rbenv-0.4.0 already installed
To install this version, first `brew unlink rbenv`
Error: ruby-build-20151028 already installed
To install this version, first `brew unlink ruby-build`
install_requirements: Upgrading outdated brew formulae...
Updating Homebrew...
Error: git 2.12.1 already installed
Error: heroku 5.6.28-2643c0a already installed
Error: qt5 5.8.0_1 already installed
==> Upgrading 2 outdated packages, with result:
rbenv 1.1.0, ruby-build 20170322
==> Upgrading rbenv 
==> Installing dependencies for rbenv: pkg-config, openssl, ruby-build
==> Installing rbenv dependency: pkg-config

Hi Kev,

Be very careful with the following commands. Removing recursively from the wrong folder could mean deleting very important files on your machine.

Lets ignore the heroku install for now because deploying applications is not really necessary for the alpha course. You should be able to follow similar steps though as we do here for rbenv.

Remove all traces of rbenv from your machine with the following commands:

  1. brew remove rbenv
  2. rm -rf ~/.rbenv

This should remove anything that was installed with homebrew and anything installed manually before. Now try reinstalling using the dotfiles. Run the install requirements script and let me know if you run into any errors or have any questions. Thanks.

Thanks for the advice Kevin!

I ran the two lines you provided. I’m ignoring the heroku errors but I’m still getting this error for qt5:

Warning: qt5 is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version

Should I do the remove qt5 similarly to how you suggested to remove rbenv as well? Or is it fine with the error as is?

Hey Kev,

Notice that this is just a warning. The dotfiles are attempting to install a different version of qt5 and homebrew is asking you if you want to forcefully install that version. This is not necessary, you can upgrade all of your homebrew installations at any time with the brew upgrade command.

This should not affect you moving forward with the alpha course, but let me know if it does. Thanks!