If you are using a new version of ubuntu, i think 9.04 or above, and you get the error(might work with other distros too)
Here is the work around.
libtermacp.so.2 is no longer a part of ubuntu, its obsolete and instead of that libncurses can be used. So run the following commands on your terminal
you will see a set of libncurse.so. files for eg :
If you do not see such files then you will have to install libncurses, which you can do using the synaptic package manager or
(You can use yum in case you are using redhat).
once you find the libnucrses.so.5.7 file run the following command
Then retry the operation that gave you the libtermcap error, you should not see the error any more.