문제

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.

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top