Alternative: Upgrade Magento using the Magento Connect Downloader
Upgrading Magento is a must to keep your store in top-top condition, protect your customers and your business.
Upgrading Magento through command line is the easiest way to make sure you are running the latest version of the Magento Software
chmod 777 mage
If all goes well you can then pull the latest version of the code source code:
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
If things didn’t go well with mage-setup you may need to run set som preferences….
./mage config-set preferred_state stable
You can then try the install command again.
That should do the trick.