I encountered an odd problem installing Riak on Linux Mint 12, which may also hit users on other Linux distros. Part way through building Riak I got the error message:
ERROR: Unable to generate spec: read file info /usr/lib/erlang/man/man1/precat.1 failed
The solution found here: https://github.com/cloudant/bigcouch/issues/33 after some Google searches was to do the following:
cd /usr/lib/erlang/man/man1 rm precat.1 ln -s precat.1.gz precat.1
You may need to be a superuser or use sudo. I had to do this with a couple of different man page files.