info: Can not find the node 'Top'. [SOLVED] Non so bene per quale motivo (ma ho l'impressione che sia colpa di un aggiornamento di Ubuntu) non sono più in grado di usare
info . Come spiegai in
uno dei primi post di questo blog, per consultare da terminale i manuali (se present) command can be used as
:
man commandname
In addition to
man, many programs (especially the GNU Project
) provide guidance (often most comprehensive manual available with
man ) that can be read with
info: info
commandname
These days, if you type (for example)
info coreutils
(to read the guidance of the main utility system, called
coreutils ) from the terminal I get this response:
info: Can not find the node 'Top'.
The message in English is:
info: Can not find node `Top '.
The problem is that for some reason the file is corrupted
/ usr / share / info / dir that contains (or in my case, it should contain) a list of manuals that can be consulted with
info . My
file / usr / share / info / dir contained only this:
This is the file ... / info / dir, which contains the
top node of the hierarchy info, call (dir) Top.
The first time you invoke the program info it starts from this node. ^ _
File: dir, Node: Top \\ tThis is the node tallest tree INFO
This (the root node) provides a menu that contains the main items.
Typing "q" exits, typing "?" it produces a list of all commands Info
"d" returns to this screen, "h" provides information to new users,
"mEmacs \u0026lt;return>" displays the Emacs manual, etc..
Within Emacs, you can click with the left mouse button on a menu item or
on a cross reference to select it.
* Menu:
As you can see, there is no list of available books, which instead should be present after the line
* Menu: .
To resolve this problem you can delete the offending file and regenerate it with the terminal command
install-info (in Debian, Ubuntu and need to invoke the command with
ginstall -info).
install-info accepts as first argument the file (these files usually have the extension
. info and may be compressed with gzip) which contains the user you want to add to the list (these files are typically located in the folder
/ usr / share / info / and its subfolders), as the second argument the list file (ie
/ usr / share / info / dir ). These two operations can be automated with the following two commands (requiring administrator rights because it will change a system file):
sudo mv / usr / share / info / dir ~ / dir
for in file / usr / share / info / *. gz {, info} / usr / share / info /*/*.{ gz, info}; do sudo install-info "$ file" / usr / share / info / dir; done
If you use systems such as Debian or Ubuntu, which
ginstall instead of-info install-info
, the second of the above commands should be changed to
for in file / usr / share / info / *. gz {, info} / usr / share / info /*/*.{ gz, info}; do sudo ginstall -info "$ file" / usr / share / info / dir; done
brief explanation of the commands suggested: the first command (mv
) is used to move the file in your home, maintaining a backup (even if the file is corrupted does not hurt to make a copy, after solving the problem, the copy can be safely deleted), the second performs a
loop on all files with extensions
. gz or
. info
in the folder / usr / share / info its subfolders. If so should not be included in some files manually, you can do it manually via
install-info (or
ginstall -info) with the syntax shown above.
Important Update: After Uncle LoneWolf's comment (thanks) I realized that the issue was more complicated than I initially seemed. To resolve this problem is not nearly enough use the commands presented earlier because
seems that there is a bug in the Italian translation of
Texinfo. You can work around (and for real this time) the problem by setting the shell in English and then again using the above commands:
LANG = en_US.UTF-8
for file in / Usr / share / info / *. gz {, info} / usr / share / info /*/*.{ gz, info}; do sudo install-info "$ file" / usr / share / info / dir; done
or
LANG = en_US.UTF-8
for in file / usr / share / info / *. gz {, info} / usr / share / info / * / *. gz {, info}; do sudo ginstall -info "$ file" / usr / share / info / dir; done
Updating the file / usr / share / info / dir can also be done with the command update-info-dir
(because as usual with administrator privileges). You can make this script always uses the English language without having to manually set each time. Open with your favorite
text editor (with administrator rights)
the script / usr / sbin / update-info-dir . For example we will use gedit:
gksudo gedit / usr / sbin / update-info-dir
Then enter the string
unset LANG # https: / / bugs.launchpad.net / ubuntu / + source / texinfo / + bug/707931
(in the commentary there is a reference to the bug report on Launchpad) for example, after the staff
unset LANGUAGE
After that you can update the file
/ usr / share / info / dir simply with the command sudo update-info-dir