Compile Nano From Source

Compiling Nano Natively

You can also compile nano natively on the device, however this will take a long time when compared to using Optware. While nano is a small package with few dependencies, the whole process will take you more than an hour to complete.1

You will need use an account that has root privileges so login as root or use the su command change to switch user. Move to the location where you want to compile[. In the following example we are using the folder /tmp/myfiles:

# su
!enter your password for root
# mkdir /tmp/myfiles
# cd /tmp/myfiles

Install the dependancies

In order to get nano compiled, you will need a version of curses installed as well. You can use ncurses from GNU.

Download the ncurses source code

# wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz

Uncompress the source and move into the source directory

# tar zxvf ncurses-5.6.tar.gz
# cd ncurses-5.6

Compile and install the program

# ./configure
# make
# make install

This whole process can take more than 40 minutes.

Install Nano

Download and uncompress the nano source code:

# wget http://www.nano-editor.org/dist/v2.0/nano-2.0.6.tar.gz
# tar -zxvf nano-2.0.6.tar.gz

Move into the directory which was just uncompressed in:

# cd nano-2.0.6

Compile the code and install the program with these commands

# ./configure
# make
# make install

(for inexperienced users, please note that these are the 3 commands used almost universally to compile and install programs in Linux. Become familiar with them if expect to compile many programs in the future)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License