Macos – How to reinstall nano on Mac OS X

installationmacosnano

I accidentally overwrote my nano app with a unix binary version, and now nano doesnt work on my Mac OS (Maverick).

How do I restore nano or get it back?

I couldnt find it on homebrew and I don't know beans about compiling src files.

Nano error when trying to use git

/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-rebase--interactive: line 225: /usr/bin/nano: cannot execute binary file
Could not execute editor

Best Answer

  1. Download the nano source (I recommend the tar.xz one) (nano-editor.org/download.php)
  2. Go to the folder it was downloaded to (By default it downloads to ~/Downloads but if you changed the directory where files download then just go there).
  3. Extract the nano source you downloaded.
  4. Open your terminal
  5. Type "cd " without the "" then drag and drop the folder you extracted and click enter.
  6. run "./configure" without the "".
  7. run "make" without the "".
  8. run "sudo make install" without the "".]

You have now successfully installed nano!

Related Question