Hi, took me a while to get in touch with this post.
With newer versions of Ubuntu, this problem seems more complicated. Problem is that you already have libncurses.so.5 but it is not recognized by the system. Easy way to fix it is to run the following command:
sudo apt-get install -y libncursesw