Unable to generate spec: read file info /usr/lib/erlang/man/man1/python3.1 failed
Would-be Erlang geeks on Debian may have been bitten by this bug recently:
tom@desktop:~/Source/xxxx $ ./rebar compile generate -v
==> ranch (compile)
==> cowboy (compile)
==> rel (compile)
==> xxxx (compile)
WARN: 'generate' command does not apply to directory /home/tom/Source/xxxx/deps/ranch
WARN: 'generate' command does not apply to directory /home/tom/Source/xxxx/deps/cowboy
==> rel (generate)
ERROR: Unable to generate spec: read file info /usr/lib/erlang/man/man1/python3.1 failed
ERROR: Unexpected error: rebar\_abort
ERROR: generate failed while processing /home/tom/Source/xxxx/rel: rebar\_abort
See how it’s whining about /usr/lib/erlang/man/man1/python3.1
? Let’s take a closer
look:
tom@desktop:~/Source/xxxx $ ls -alh /usr/lib/erlang/man/man1/python3.1
lrwxrwxrwx 1 root root 11 May 8 14:14 /usr/lib/erlang/man/man1/python3.1 -> python3.2.1
tom@desktop:~/Source/xxxx $ ls -alh /usr/lib/erlang/man/man1/python3.2.1
ls: cannot access /usr/lib/erlang/man/man1/python3.2.1: No such file or directory
Ah. /usr/lib/erlang/man/man1/python3.2.1
is missing.
Let’s delete the broken symlink at /usr/lib/erlang/man/man1/python3.1
and try
rebuilding our Erlang app again:
tom@desktop:~/Source/xxxx $ sudo rm -f /usr/lib/erlang/man/man1/python3.1
tom@desktop:~/Source/xxxx $ ./rebar compile generate
==> ranch (compile)
==> cowboy (compile)
==> rel (compile)
==> xxxx (compile)
tom@desktop:~/Source/xxxx $
Fixed!
Check out python3 bug #707606 in the Debian bug tracker if you’d like to keep a closer eye on this.