Question

When I run rebar generate to generate a node using reltool, it fails with this error message:

ERROR: Unable to generate spec: read file info /usr/lib/erlang/man/man1/gserialver.1.gz failed

Why does that happen, and what can I do about it?

I'm running Debian squeeze (6.0.6), if that helps.

Was it helpful?

Solution

rebar prints Unable to generate spec when it gets an error message from reltool; the rest of the message comes directly from reltool. In this case, reltool is trying to get file info for various files in the Erlang directory, but fails because gserialver.1.gz is a dangling symlink.

You might wonder why gserialver.1.gz is installed under /usr/lib/erlang. It actually isn't, but Debian creates /usr/lib/erlang/man as a symlink to /usr/share/man:

$ ls -l /usr/lib/erlang/man
lrwxrwxrwx 1 root root 15 Nov 15 12:19 /usr/lib/erlang/man -> ../../share/man

So the real culprit is /usr/share/man/man1/gserialver.1.gz, which is installed by the package gcj-jre-headless. There is a bug report about that which claims that this has been fixed; however if that's not the case on your box, here is a command that will move the file out of the way and make rebar happy:

sudo dpkg-divert --divert /var/gserialver.1.gz --rename /usr/share/man/man1/gserialver.1.gz
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top