9

I have a fresh installation of Ubuntu 16.04 LTS, and tried to install a few apps using the new snap packages. The installation of those packages goes easy, but when I try to do man <package> I cannot open the man page. For example:

$ man tmux  
No manual entry for tmux  
See 'man 7 undocumented' for help when manual pages are not available.

The whereis command gives me this output:

$ whereis tmux  
tmux: /snap/bin/tmux

But the truth is that the man page file exists:

$ ls -l $PWD/*  
-rw-r--r-- 1 root root 100394 Abr 20 06:46 /snap/tmux/current/share/man/man1/tmux.1

How can I get this to work? Is there any problem with the snap package management?

7

A 'band-aid' solution is to run the following from the command line:

export MANPATH=":/snap/tmux/current/share/man"

and then the command man tmux will work as well as all of your pre-exisiting man pages. Bear in mind that Ubuntu does not normally use $MANPATH and the standard man pages PATH can be seen as follows:

andrew@athens:~$ man -w
/usr/local/man:/usr/local/share/man:/usr/share/man

After running the 'band-aid' solution suggested above you should see:

andrew@athens:~$ man -w
/usr/local/man:/usr/local/share/man:/usr/share/man:/snap/tmux/current/share/man

This setting can also be placed in ~/.bashrc for permanency, remembering that after placing it there either log out and then back in or simply run: source ~/.bashrc

Not very satisfactory I must say, especially if each package has a man page in a different location. Let us hope that as standards solidify this will be less of a problem...

References:

  • 1
    Thank you for your comprehensive answer. I get surprised how a technology previously matured on Ubuntu Core comes to an LTS with this failure in mind, when the propose of those snaps is to bypass some deb's limitations (eg. to have an updated version of an app/tool regardless the dependencies present on the base system). Indeed, each snap package suffers from this problem, and it gets unmanageable to take care of each one. Canonical must address this problem. – Ruben Pedro Apr 29 '16 at 15:15
  • There is a case for a bug report on Launchpad for this issue, particularly if you can cite examples of multiple packages. Please 'accept' my answer if it has been useful btw... – andrew.46 Apr 29 '16 at 20:08
  • Yep, you're right. Here's the link to the issue: Snappy installed manpages aren't inaccessible through man – Ruben Pedro Apr 30 '16 at 6:56
  • Here it is from the developer perspective: forum.snapcraft.io/t/support-for-man-pages/2299/7 – user535733 Feb 27 at 21:02

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.