Score:0

cannot compile nano from source

et flag

i am trying to build nano from source, but the installation guide doesn't make any sense. it says to run ./configure but there isn't any configure file, and even in some of the repository it is in, it doesn't do anything.

i am on Ubuntu server 22.04.2 LTS if that helps

terdon avatar
cn flag
Please [edit] your question and give us something to go on. First, what source? Where did you get it from? Where can we get it from? What installation guide? Where can we see that? We can't help you if you don't tell us what you are actually doing.
Artur Meinild avatar
vn flag
Most likely the source is the [official build guide](https://git.savannah.gnu.org/cgit/nano.git/tree/README.hacking).
Score:4
us flag

It is actually very easy, just read the compile instruction in the repository. Lets assume, you want to compile the latest version v7.2 yourself.

  1. Enable jammy sources for apt and update the repositories
    $ sudo bash -c 'echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy main" > /etc/apt/sources.list.d/jammy_sources.list'
    $ sudo apt update
    
  2. Install all build dependencies from Ubuntu for nano
    $ sudo apt build-dep nano -y
    
  3. Install git for cloning the nano repo and checkinstall for easy Debian package generation.
    $ apt install git checkinstall -y
    
  4. Clone, checkout v7.2, generate autotools files, configure and build nano
    $ git clone https://git.savannah.gnu.org/git/nano.git
    $ cd nano
    $ git checkout v7.2
    $ ./autogen.sh
    $ ./configure
    $ make -j$(nproc)
    
  5. Finally install the package with checkinstall. Since Ubuntu has already a nano package, we will call the package mynano to avoid conflicts.
    $ sudo checkinstall -D -y --pkgname=mynano
    

That's it. Now you will find nano in /usr/loca/bin/nano Therefore it will not damage the original nano package and due to the execution order in the $PATH, it will be called, even if the normal nano package is installed.

If you want or need to remove your self build nano, just call:

$ sudo dpkg -r mynano
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.