Ubuntu 12.04 reached end-of-life in April. It will be best to upgrade to another LTS version first, like 14.04 (good until April 2019) or 16.04 (good until April 2021). It's kind of fighting a losing battle to try to maintain or upgrade packages in an out of date operating system.
Cheers!