I've uninstalled software from brew (as I want to use a different version), using MacOS High Sierra 10.13.1
brew uninstall bowtie2
And downloaded the software from SourceForge instead, then copied the executables onto the $PATH
which bowtie2
> /usr/local/bin/bowtie2
However when I try to run the command
bowtie2
I get the error
> -bash: /usr/local/Homebrew/bin/bowtie2: No such file or directory
So it's still searching for the old path in the Homebrew folder. How do I change this?
Best Answer
Homebrew likes to create symlinks from
/usr/local/bin/
to/usr/local/Cellar/
.You can see if this is the case by running:
ls -l /usr/local/bin/bowtie2
.That should return a line with arrow syntax (
->
) like this:If that's the case, then you can just delete the broken symlink with:
rm /usr/local/bin/bowtie2
(you may need to preface that withsudo
depending on ownership of/usr/local/bin/
. It's the broken symlink that is causingwhich
to still showbowtie2
as being located in/usr/local/bin/
.You can then move the new binary for bowtie (that you downloaded from SourceForge) into
/usr/local/bin/
or any other folder in your PATH.