27

I've been trying to upgrade to 12.10 ever since it was released today but I keep meeting this error:

An unresolvable problem occurred while calculating the upgrade:
E:Unable to correct problems, you have held broken packages.
This can be caused by:  
 * Upgrading to a pre-release version of Ubuntu  
 * Running the current pre-release version of Ubuntu  
 * Unofficial software packages not provided by Ubuntu

I've tried updating all the currently installed software, removing all the extra PPAs, downgrading the files installed from xorg edgers' ppa but I haven't been able to solve the problem.

Vagrant232
  • 1,285
  • 4
  • 15
  • 29

6 Answers6

31

As stated here , removing PPA sources does not work every time.

You need to uninstall offending packages. you can find them with:

grep Broken /var/log/dist-upgrade/apt.log

Mine was an xorg package. I removed it with the command:

sudo apt-get remove xserver-xorg-video-all

and then the upgrade could continue.

Kazark
  • 698
Massimo
  • 319
25

For a "NonPainful" release upgrade.

  • Before proceed, check if the new release is available for upgrade. Open a terminal and give this command

    do-release-upgrade -c

If yes, proceed:

  • Remove all the external PPAs you've added.

    From Software-Center > Edit > Software Sources > Other Software. Do not only un-tick ,but delete them.

  • Then close all the graphical applications and open only a terminal.(Fullscreen is better) Give the bellow commands

    sudo apt-get update 
    sudo apt-get dist-upgrade
    
  • Then give the bellow commands to do a little housekeeping

    sudo apt-get --purge autoremove
    sudo apt-get autoclean
    sudo apt-get purge $(dpkg -l | awk '/^rc/ { print $2 }')
    
  • Then you can procceed with the upgrade

    sudo do-release-upgrade
    

Do not navigate or open windows or programs during the upgrade.

Be patient until the upgrade finish.

Friendly: Do not run (or rush) to upgrade from the day one. Upgrade from the day two or three(better).

NickTux
  • 17,865
  • 6
  • 57
  • 66
8

I fixed mine by removing ppa packages I had installed using ppa-purge

I knew I needed to do this by checking the logs in /var/log/dist-upgrade/ at the end of the apt.log file youll see what was confusing it. In mine it was a video driver, and i was running several upgrades, so I did:

sudo ppa-purge ppa:ubuntu-x-swat/x-updates
sudo ppa-purge ppa:unity-team/staging
sudo ppa-purge ppa:webapps/preview
sudo ppa-purge ppa:nilarimogard/webupd8
sudo ppa-purge ppa:scopes-packagers/ppa
sudo ppa-purge ppa:glasen/intel-driver

the last one - the glasen driver - seems to have done the trick for me. Upgrade is now proceeding as normal.

Eliran Malka
  • 1,245
  • 18
  • 36
user92965
  • 136
3

I managed to solve the problem without removing any packages. On the settings for the update manager, I unchecked all of the Ubuntu Software options, leaving only the first box checked -- "Canonical-supported free and open-source software (main)".

macflav
  • 66
3

I had this error message on upgrading, albeit between different versions — I was doing 14.04 Trusty -> 16.04 Xenial — but I think this tip may be useful to other people who get the same error, since it took me ages to figure out, and this answer comes up prominently in Google.

It's important to check if there is any error in /var/log/dist-upgrade/main.log - in my case, there was an error that saying that postgresql-9.3-postgis-2.1 was blacklisted from being removed, and the upgrade process was trying to remove it. Removing that package let me upgrade.

(n.b. /var/log/dist-upgrade/apt.log may mislead you by listing "Broken" packages which actually won't block the upgrade.)

This is also pointed in this similar question and answer: https://askubuntu.com/a/541406/13868

Incidentally, running sudo ubuntu-bug ubuntu-release-upgrader-core after the failed upgrade, can actually detect such problems and open the corresponding bug report in your web browser - that's what helped me to find the problem.

-4
sudo sed -i 's/raring/saucy/' /etc/apt/sources.list
sudo apt-get dist-upgrade

that worked for me.

Seth
  • 59,332
Jirobo
  • 1