18

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?

3 Answers 3

16

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:

4
  • 2
    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. Apr 29, 2016 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, 2016 at 20:08
  • 1
    Yep, you're right. Here's the link to the issue: Snappy installed manpages aren't inaccessible through man Apr 30, 2016 at 6:56
  • 1
    Here it is from the developer perspective: forum.snapcraft.io/t/support-for-man-pages/2299/7
    – user535733
    Feb 27, 2019 at 21:02
0
sudo ln -s /snap/tmux/current/share/man/man1/tmux.tar.gz /usr/share/man1/tmux.tar.gz

will also do the trick. This way, any snap command's manpages can be added to the default manpath. I tried this with the jq command and it worked great.

0

This

sudo ln -s /snap/curl/current/share/man/man1/curl.1 /usr/share/man/man1/curl.1

worked for me for https://github.com/woutervb/snap-curl

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .