Install nano ver 6 on ununtu/debian os from source
sudo apt-get purge nano ; sudo apt install libmagic-dev libgpm-dev wget texinfo
Install build deps
export issue_name="focal"
sudo apt install -y libncursesw5-dev checkinstall
curl -L https://www.nano-editor.org/dist/v6/nano-6.0.tar.gz -o /tmp/nano-6.0.tar.gz
cd /tmp/ && tar -xvf nano-6.0.tar.gz
cd nano-6.0
./configure --prefix=/usr \
--sysconfdir=/etc \
--enable-utf8 \
--enable-color --enable-extra --enable-multibuffer \
--enable-libmagic \
--enable-speller \
--docdir=/usr/share/doc/nano-6.0
sudo checkinstall --install=no -D -y --fstrans=yes --reset-uids=yes --pkgname=nano --pkgversion=6 --pkgrelease=${issue_name} --arch=amd64 --pkglicense=GPL --maintainer="Alexander Galushko <a.v.galushko86@gmail.com>"
sudo dpkg -i nano_6-${issue_name}_amd64.deb
sudo ldd $(which nano)