help-nano
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to compile with --enable-nanorc?


From: Benno Schulenberg
Subject: Re: How to compile with --enable-nanorc?
Date: Thu, 5 Dec 2019 13:53:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1

[In case you reply, then please only to the list.]

Op 04-12-2019 om 22:26 schreef flomanstrategy:
> Hello, I compiled nano (v 2.9 bcause it's not available on debian stretch)

Version 2.9 does not exist.  Do you mean 2.9.0?  But when you are
compiling from source, why not the latest version, 4.6?

> and by
> default nanorc is not read which was very surprising.
> 
> So I tried to fix it by recompiling like that:
> ./configure --enable-nanorc --enable-color --enable-multibuffer 
> --sysconfdir=/etc
> --prefix=/usr

All the --enable... things are the default, so you can leave them out.
The --sysconfdir=/etc is the default too, I think.  Anyway, it should
not be needed, so better leave it out.  The only configure option that
you need is --prefix=/usr (if you want to overwrite the system-installed
nano instead of having an additional, locally installed nano).

> make
> make install

I suppose you use 'sudo' before that last command?  Or are you building
nano while being root?

> Also tried other variants, but the result is that /etc/nanorc is never read
> 
> strace -fe trace=open nano /etc/nanorc

Which nano is this running?  You can find out with 'which nano',
or with 'type - nano'.

Anyway, it's better to run strace without any options, so you get a
full log and can grep the result for various strings.  I would do the
following:

  strace nano README  2>TRAIL; grep access TRAIL | grep nanorc | less

This will show where nano is looking for its rc files -- because nano will
first probe for the places where rc files might be; it will not simply try
and open them right away.

Did you maybe compile and install nano at first without the --prefix=/usr
option?  If yes, then you need to configure it again without that option
and run 'make uninstall', to get rid of the nano in /usr/local/bin/.

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]