4

I installed NANO 2.4 but my OS X is still using 2.0. I beleive its something to do with the symbolic link that wasn't created.

I first tapped the homebrew/dupes so i could brew install nano

~  brew tap homebrew/dupes
==> Tapping homebrew/dupes

~  brew install nano
==> Installing nano from homebrew/homebrew-dupes

If I do a

which nano

I get

/usr/bin/nano

but the brew installed in the directory below and I have it confirmed as 2.4 by running the program directlt from here

/usr/local/Cellar/nano/2.4.2_1/bin

I think a symbolic link wasn't created becasue nano is already included with mac os x, is it safe to override it ?

I got the following warning on the brew install from

==> Downloading https://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/ncurses/6.0 --enable-pc-files --enable
==> make install
==> Caveats This formula is keg-only, which means it was not symlinked into /usr/local.

OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/ncurses/lib
    CPPFLAGS: -I/usr/local/opt/ncurses/include

==> Summary 🍺  /usr/local/Cellar/ncurses/6.0: 1970 files, 21M, built in 114 seconds
4

You can always create a symlink in /usr/local/bin manually, which (depending on the order of path components in $PATH) will then shadow the standard binary in /usr/bin. As nano is used interactively only, the risk of breaking anything is probably rather small.

  • hi. Yes it appears that a symlink already exists in /usr/local/bin – Martin Oct 18 '15 at 9:53
  • 31B Oct 18 10:42 nano -> ../Cellar/nano/2.4.2_1/bin/nano – Martin Oct 18 '15 at 9:53
  • but the usr/bin is taking precedence over the /usr/local/bin – Martin Oct 18 '15 at 9:54
  • Is the simple answer here to remove NANO from the /usr/bin ? I noticed my path has the /usr/local/bin first, so I don't know why its not picking it up echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin – Martin Oct 18 '15 at 9:58
  • 4
    Just start a new shell then, the old path is still hashed – nohillside Oct 18 '15 at 10:00
-1

I was having the same issue, the reason was, wrong path priority.

To fix you have to edit /etc/paths (global system file) and set /usr/local/bin before /usr/bin.

In my case, my paths file was:

/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin

And I modified to:

/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

Then save the file and restart the terminal session. All OK after that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .