Alright, so I upgraded my Ubuntu 12.04 to Ubuntu 12.10 (over ssh). Now before you guys all start bashing me for upgrading over ssh, I knew the risks and I took them. My system works fine-ish, but there are some problems. I cannot install any packages through aptitude, no matter what I try to do, I always end up getting the same error:

E: Internal Error, No file name for libtinfo5

I've tried

sudo apt-get -f install
sudo apt-get -f autoremove
sudo apt-get -f upgrade

All of them show me that there is something that needs to be removed or installed, but the process halts as soon as the libtinfo5 error appears.

Any suggestions?