The R12B release is from 2008. There was an update in how it handles ODBC libs in R13A, according to the readme file from that release:
The configure script of the odbc application now also looks
for odbc libraries in lib64 and lib/64 directories when
building on a 64-bit system.
This may explain why an older release is having trouble with locating the right ODBC library.
If you don't have any need for that specific version (and I sincerely hope you don't!), you should instead add the Erlang repository to get the current release:
wget
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
If you don't want do that, you could use the version in the `epel` repository is R14B, which is at least from this decade (2010 to be precise). To start using that repository, run
su -c 'rpm -Uvh
and then try installing erlang again.