82

I am running sudo update-manager -d and start the upgrade process. I select upgrade option and when then manager enters Setting new software channels it throws an error.

Could not calculate the upgrade

An unresolvable problem occurred while calculating the upgrade.

 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

If none of this applies, then please report this bug using the command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal.

I have disabled all unofficial and third party packages, I am not running a pre-release version since I am at 13.04 and I am trying to update to beta 2 which is not a pre-release. Before I fill a bug report, since its happening to both of my systems I would like to figure out if anyone else had same issues.

EDIT: added output for comment.

$ sudo dpkg -l | grep -w "rc"`
rc google-chrome-beta 31.0.1650.16-1 amd64 The web browser from Google
ii sysv-rc 2.88dsf-13.10ubuntu15 all System-V-like runlevel change mechanism

$ cat /etc/apt/sources.list

deb http://dk.archive.ubuntu.com/ubuntu/ raring main restricted
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring main restricted

deb http://dk.archive.ubuntu.com/ubuntu/ raring-updates main restricted
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring-updates main restricted

deb http://dk.archive.ubuntu.com/ubuntu/ raring universe
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring universe
deb http://dk.archive.ubuntu.com/ubuntu/ raring-updates universe
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring-updates universe

deb http://dk.archive.ubuntu.com/ubuntu/ raring multiverse
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring multiverse
deb http://dk.archive.ubuntu.com/ubuntu/ raring-updates multiverse
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring-updates multiverse

deb http://security.ubuntu.com/ubuntu raring-security main restricted
deb-src http://security.ubuntu.com/ubuntu raring-security main restricted
deb http://security.ubuntu.com/ubuntu raring-security universe
deb-src http://security.ubuntu.com/ubuntu raring-security universe
deb http://security.ubuntu.com/ubuntu raring-security multiverse
deb-src http://security.ubuntu.com/ubuntu raring-security multiverse

deb http://extras.ubuntu.com/ubuntu raring main
deb-src http://extras.ubuntu.com/ubuntu raring main
deb http://dk.archive.ubuntu.com/ubuntu/ raring-proposed multiverse universe restricted main

$ lsb_release -c
Codename:   raring

$ sudo apt-get -y install aptitude && \
      sudo rename 's/\.list$/.list.disable/' /etc/apt/sources.list.d/*.list && \
      sudo aptitude update && \
      aptitude search '?narrow(?installed, !?archive(raring))'`

i   dropbox                       - cloud synchronization engine - CLI and Nautilus extension                      
i   google-chrome-stable          - The web browser from Google                                                    
i   google-talkplugin             - Google Talk Plugin                                                             
i   libdrm-intel1                 - Userspace interface to intel-specific kernel DRM services -- runtime           
i   libdrm-nouveau2               - Userspace interface to nouveau-specific kernel DRM services -- runtime         
i   libdrm-radeon1                - Userspace interface to radeon-specific kernel DRM services -- runtime          
i   libdrm2                       - Userspace interface to kernel DRM services -- runtime                          
i   libegl1-mesa                  - free implementation of the EGL API -- runtime                                  
i   libegl1-mesa-drivers          - free implementation of the EGL API -- hardware drivers                         
i   libgbm1                       - generic buffer management API -- runtime                                       
i   libgl1-mesa-dri               - free implementation of the OpenGL API -- DRI modules                           
i   libgl1-mesa-glx               - free implementation of the OpenGL API -- GLX runtime                           
i   libglapi-mesa                 - free implementation of the GL API -- shared library                            
i A libgles2-mesa                 - free implementation of the OpenGL|ES 2.x API -- runtime                        
i   libllvm3.3                    - Low-Level Virtual Machine (LLVM), runtime library                              
i   libopenvg1-mesa               - free implementation of the OpenVG API -- runtime                               
i   libxatracker1                 - X acceleration library -- runtime                                              
i   nodejs                        - Node.js event-based server-side javascript engine                              
id  nvidia-persistenced           - Load the NVIDIA kernel driver and create device files                          
id  nvidia-settings-331           - Tool for configuring the NVIDIA graphics driver                                
i   simplescreenrecorder          - A feature-rich screen recorder that supports X11 and OpenGL.                   
i A simplescreenrecorder-lib      - A feature-rich screen recorder that supports X11 and OpenGL.                   
i   sublime-text                  - Sublime Text is a sophisticated text editor for code, markup and prose         
i   vokoscreen                    - easy to use screencast creator                                                 
i   xserver-common                - common files used by various X servers                                         
i   xserver-xorg-core             - Xorg X server - core server                                                    
i   xserver-xorg-input-synaptics  - Synaptics TouchPad driver for X.Org server                                     
i   xserver-xorg-video-ati        - X.Org X server -- AMD/ATI display driver wrapper                               
i   xserver-xorg-video-cirrus     - X.Org X server -- Cirrus display driver                                        
i   xserver-xorg-video-intel      - X.Org X server -- Intel i8xx, i9xx display driver                              
i   xserver-xorg-video-mach64     - X.Org X server -- ATI Mach64 display driver                                    
i   xserver-xorg-video-nouveau    - X.Org X server -- Nouveau display driver                                       
i   xserver-xorg-video-r128       - X.Org X server -- ATI r128 display driver                                      
i   xserver-xorg-video-radeon     - X.Org X server -- AMD/ATI Radeon display driver                                
i   xserver-xorg-video-vmware     - X.Org X server -- VMware display driver        
muru
  • 207,228
topless
  • 7,465

10 Answers10

63

What worked for me was removing any broken packages, as they were preventing the upgrade.

First find out which packages are broken:

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

Then remove them:

sudo apt-get remove <packages to remove>

Some might be reinstalled during the upgrade, others you may have to reinstall yourself.

Dennis
  • 413
DaShaun
  • 819
50

After your system fails to upgrade, check the file /var/log/dist-upgrade/main.log

I found the line:

2013-10-17 15:00:30,543 ERROR Dist-upgrade failed: 'The package 'xubuntu-desktop' is marked for removal but it is in the removal blacklist.'

I manually removed xubuntu-desktop. The upgrade then continued without issue.

Alvar
  • 17,038
Jake
  • 601
6

Similar issue here. Last few lines in the "main.log" file indicated in the previous post were:

2013-10-17 23:44:38,233 DEBUG blacklist expr 'unity$' matches 'unity'
2013-10-17 23:44:38,233 DEBUG The package 'unity' is marked for removal but it's in the removal blacklist
2013-10-17 23:44:43,585 ERROR Dist-upgrade failed: 'The package 'unity' is marked for removal but it is in the removal blacklist.'
2013-10-17 23:44:43,586 DEBUG abort called
2013-10-17 23:44:43,592 DEBUG openCache()
2013-10-17 23:44:43,592 DEBUG failed to SystemUnLock() (E:Not locked) 
2013-10-17 23:44:46,786 DEBUG /openCache(), new cache size 41453
2013-10-17 23:44:46,786 DEBUG enabling apt cron job

Manually de-installed unity and upgrade now proceeds. Not quite sure what causes this issue in the first place and whether this is truly a good "solution" but I guess I'll find out after the update is completed?!?

kiri
  • 28,986
4

In my case, the problem was caused by a package that was in hold state. Putting it back to install state resolved the problem.


A possible way to put or remove a package in hold state is using dpkg. First, you get the current state of all packages, and put it into a file:

dpkg --get-selections > myselection

Then, you edit the file and replace install by hold, or vice-versa. Finally, you set the new selection:

sudo dpkg --set-selections < myselection
sudo apt-get update
sudo apt-get upgrade

Other ways are described in How to hold a package back from being upgraded?

4

If you are using the proprietary AMD/ATI fglrx video drivers, removing the fglrx packages and the xorg video driver will likely fix it:

sudo apt-get remove fglrx fglrx-amdcccle-updates
sudo apt-get remove xserver-xorg-video-ati:amd64

In my case, I had the fglrx drivers installed from the xorg-edgers PPA, and removing those packages cleared up my upgrade. Once the upgrade is complete, you can go through the process of setting up the proprietary drivers again.

2

I had the same issue but was easily overcome by running the following in terminal:

sudo apt-get remove
sudo apt-get autoremove
seyDoggy
  • 131
2

Apparently there is a easy way, just add /raring to each package name, like this:

sudo apt-get install dropbox/raring google-chrome-stable/raring google-talkplugin/raring libdrm-intel1/raring libdrm-nouveau2/raring libdrm-radeon1/raring libdrm2/raring libegl1-mesa/raring libegl1-mesa-drivers/raring libgbm1/raring libgl1-mesa-dri/raring libgl1-mesa-glx/raring libglapi-mesa/raring libllvm3.3/raring libopenvg1-mesa/raring libxatracker1/raring nodejsnvidia-persistencednvidia-settings-331/raring simplescreenrecorder/raring sublime-text/raring vokoscreen/raring xserver-common/raring xserver-xorg-core/raring xserver-xorg-input-synaptics/raring xserver-xorg-video-ati/raring xserver-xorg-video-cirrus/raring xserver-xorg-video-intel/raring xserver-xorg-video-mach64/raring xserver-xorg-video-nouveau/raring xserver-xorg-video-r128/raring xserver-xorg-video-radeon/raring xserver-xorg-video-vmware/raring

If it doesn't work, then try the method below.


That was expected, you have several packages that are not from the Ubuntu repositories that are critical for the installation. You should downgrade them, one by one (I haven't found a efficient way to do this) and then attempt the upgrade. I will make one as example:

$ apt-cache policy libdrm2
libdrm2:
  Installed: 2.4.43-0ubuntu1.1
  Candidate: 2.4.43-0ubuntu1.1
  Version table:
 *** 2.4.43-0ubuntu1.1 0
        100 /var/lib/dpkg/status
     2.4.43-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ raring/main amd64 Packages

In your case, something like this should appear. You should take note of the version that has a url, in this case 2.4.43-0ubuntu1 that has http://archive.ubuntu.com/ubuntu/, save the pair for later in a text file using the format <package>=<version>.

If you see something like:

fluxgui:
  Installed: 1.1.8
  Candidate: 1.1.8
  Version table:
 *** 1.1.8 0
        100 /var/lib/dpkg/status

notice that doesn't have a url, then that package can be removed:

sudo apt-get remove fluxgui

Then you finish your list should looks like:

libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1

(again and example, but you might be have an idea)

Once you have your list complete, type sudo apt-get -f install and paste your complete list, so it should looks like:

sudo apt-get -f install libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1

If you want to do it somewhat faster, you could use apt-cache policy libdrm2 libgbm1 with several package names.

Braiam
  • 69,112
2

I followed several of the answers above, attempting to get the upgrade to work, none of the ones not involving deleting Broken packages worked. I had 144 Broken packages, which seemed completely impractical. I deleted them one at a time, attempting the update after each one. After deleting 3 (perl-base,gnuplot, gnuplot-11), chosen essentially at random, the update succeeded. (14.04 to 16.04).

rdl
  • 81
0

Regarding this answer, which works for me, a bit better variant exists: I've found automated script to remove Broken packages if there are too many. Solution found here.

remove.sh script:

#!/bin/bash
apt update
apt upgrade
cat /var/log/dist-upgrade/apt.log | egrep -o "^Broken\s[a-z:\.0-9-]*" | sed 's/Broken //' | sed 's/:amd64//' > packages.txt
sort -u packages.txt > packages_sorted.txt
while read line; do
        apt remove -y $line 
done < packages_sorted.txt
apt autoremove -y && sudo apt autoclean -y
echo "Done"
apt install -f
dpkg --configure -a

Run:

sudo ./remove.sh

then do sudo do-release-upgrade as usual.

if necessary removed packages could be reinstalled from packages_sorted.txt file or in automated manner:

reinstall.sh script:

#!/bin/bash
while read line; do
        apt install -y $line 
done < packages_sorted.txt
echo "Done"
-2

I already answered this a while back if you had done a simple search here before posting the question.

sudo mv /etc/apt/sources.list.d/ /etc/apt/sources.list.d.bak; sudo sed -i 's/raring/saucy/g' /etc/apt/sources.list; sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get dist-upgrade -y; sudo apt-get install -f; sudo aptitude upgrade -y; sudo aptitude dist-upgrade -y; sudo mv /etc/apt/sources.list.d.bak /etc/apt/sources.list.d; sudo sed -i 's/raring/saucy/g' /etc/apt/sources.list.d/*; sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get dist-upgrade -y; sudo apt-get install ubuntu-desktop -y

Done, resolves all issues

mmstick
  • 1,977