4

I am using asdf + asdf-erlang as my version manager for Erlang. All seems to be working fine, except that typing erl -man mnesia results in No manual entry for mnesia.

I have installed all dependencies mentioned on the asdf-erlang github page. I have also installed xsltproc and fop. Unfortunately "man" folder located under ~/.asdf/installs/erlang/18.3/lib/erlang/erts-73/ is empty. I haven't found man pages being generated elsewhere.

I was trying to locate build log, but I was not successful with that either.

I am using 64bit Ubuntu 16.10 & 16.04.

Stratus3D
  • 4,648
  • 4
  • 35
  • 67
Maciek Talaska
  • 1,628
  • 1
  • 14
  • 22

3 Answers3

5

OK. I finally managed to resolve the issue:

  1. Go to https://www.erlang.org/downloads/ and download manpages for the version(s) of Erlang you have installed using asdf (so for 18.3 you're looking for: http://erlang.org/download/otp_doc_man_18.3.tar.gz)

  2. Copy man folder with its content (extracted from the archive) to ~/.asdf/installs/erlang/<version>/lib/erlang/. After doing so, you should have .~/asdf/installs/erlang/<version>/lib/erlang/man containing man1, man3, man4, man6, man7 (and each of those folders should have some manpages in it).

Repeating steps above for all the versions installed using asdf, allows you to use manpages for specific version of Erlang you are using at the moment.

Maciek Talaska
  • 1,628
  • 1
  • 14
  • 22
3

looks like erlang-manpages are not included in the asdf-erlang since you are using ubuntu i would suggest you add Erlang Solutions repository to your system, call the following commands:

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update

then install erlang-manpages:

sudo apt-get install erlang-manpages

you could also install erlang-doc — HTML/PDF documentation

sudo apt-get install erlang-doc

check this page for more information

byaruhaf
  • 4,128
  • 2
  • 32
  • 50
  • Hi byaruhaf and thank you for your answer. I can't mix Erlang installed using asdf and manpages coming from somewhere else (it just doesn't work, and `erl -man io` still returns error message). As for the moment - I would like to stick to asdf as manager for Erlang versions. I hope the 'manpages problem' is something that can be fixed. – Maciek Talaska Feb 05 '17 at 14:01
  • In Ubuntu 20.04 LTS you can just do: sudo apt-get install erlang-manpages it's included in the default universe repo. – Vincent Gerris Oct 01 '20 at 20:22
1

The man path in @MaciekTalaska 's answer seems not correct, it does not work at all, for erlang 18.3.

After reading ASDF's activate script(), here's one statement:

_KERL_MANPATH_REMOVABLE="$HOME/.asdf/installs/erlang/18.3/lib/erlang/man:$HOME/.asdf/installs/erlang/18.3/man"

Therefore, you just need to:

Go to https://www.erlang.org/downloads/ and download manpages for the version(s) of Erlang you have installed using asdf (so for 18.3 you're looking for: http://erlang.org/download/otp_doc_man_18.3.tar.gz)

Copy man folder with its content (extracted from the archive) to $HOME/.asdf/installs/erlang/${version}, but not $HOME/.asdf/installs/erlang/${version}/lib/erlang/ (in fact, there isn't a folder named erlang under lib).

d0zingcat
  • 929
  • 8
  • 10