What is the recommended way of dealing with GNU Stow conflicts?

I tried to stow readline-6.2 and got the following warning:

> stow readline-6.2
Loading defaults from /home/josh/.stowrc
WARNING! stowing readline-6.2 would cause conflicts:
  * existing target is stowed to a different package: share/info/dir =>  
All operations aborted.

The clash is with the package stow_2.2.0_canonical_paths which is the package dir for stow (this is because I bootstrapped stow).

Here is is what that conflicting target contains:

> cat ~/local/share/info/dir 
This is the file .../info/dir, which contains the
topmost node of the Info hierarchy, called (dir)Top.
The first time you invoke Info you start off looking at this node.

File: dir,      Node: Top       This is the top of the INFO tree

  This (the Directory node) gives a menu of major topics.
  Typing "q" exits, "?" lists all Info commands, "d" returns here,
  "h" gives a primer for first-timers,
  "mEmacs<Return>" visits the Emacs manual, etc.

  In Emacs, you can click mouse button 2 on a menu item or cross reference
  to select it.

* Menu:

System administration
* Stow: (stow).                 GNU Stow.

What would be the recommended way of resolving this conflict?


The dir file is automatically generated/expanded by install-info and contain information about the available documentation of the texinfo documentation system.

You can simply delete this file. If you want to use info system, you can try to merge the dir into the other before. Or you can run a install-info command (e.g. install-info --info-dir=$PWD time.info.gz) in the share/info directory after you have linked all files there with stow.

Another option is to switch to xstow which can merge this file automatically if you add the following to your xstow.ini.

match = dir # GNU info index file
exec = merge-info %t %s -o %t
exec-unstow = merge-info -u %t %s -o %t
  • Thank you jofel. I recently started with stow since I thought xstow was dead (the last update to xstow was in 2010). In contrast, stow seems to have an active repository and seems to be part of the official GNU tools). I have also noticed that stow has recently added some new features, perhaps closing the gap with xstow, but I may be wrong. Would you still recommend xstow? What other features have you noticed that xstow has that modern versions of stow doesn't? – Amelio Vazquez-Reina Apr 23 '13 at 16:31
  • 2
    Yeah, I think xstow is probably a dead project. I like the idea of post-(un)install hooks though - whilst Stow doesn't aim to be a full-blown package manager like rpm or dpkg, hooks make sense, so I've added them to the TODO file. – Adam Spiers Apr 24 '13 at 7:49

With GNU autotools software, you may specify --infodir separately from --prefix when you run ./configure.

I used to have a separate stow directory for all info-documents, until I realized I never read them...


You can remove the dir file after make installing but before stowing. Then, after stowing simply call install-info to merge the info files into the original dir. I think that the cleanest solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.