You may want to try following the commands discussed in this thread (see also comments below):
This solved the upgrade issues for me.