问题描述
我正在运行sudo update-manager -d
并开始升级过程。我选择升级选项,当经理进入Setting new software channels
时,它会抛出一个错误。
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.
我已禁用所有非官方和第三方软件包,我没有运行pre-release版本,因为我在13.04,我正在尝试更新到beta 2,而不是pre-release。在我填写错误报告之前,由于它发生在我的两个系统中,我想弄清楚是否有其他人有同样的问题。
编辑:添加输出以供评论。
$ 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
最佳解决方案
对我来说有用的是删除任何破损的软件包,因为它们阻止了升级。
首先找出哪些包破坏了:
grep Broken /var/log/dist-upgrade/apt.log
然后删除它们:
sudo apt-get remove <packages to remove>
有些可能会在升级过程中重新安装,有些则可能需要自行重新安装。
次佳解决方案
系统升级失败后,请检查文件/var/log/dist-upgrade/main.log
我找到了这条线:
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.'
我手动删除了xubuntu-desktop。升级然后继续没有问题。
第三种解决方案
类似的问题在这里上一篇文章中指出的”main.log”文件中的最后几行是:
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
现在手动de-installed统一升级。不太确定是什么原因造成这个问题,这是否真的是一个很好的”solution”,但我想我会在更新完成后发现?!?
第四种方案
如果您使用专有的AMD /ATI fglrx视频驱动程序,删除fglrx软件包和xorg视频驱动程序可能会解决它:
sudo apt-get remove fglrx fglrx-amdcccle-updates
sudo apt-get remove xserver-xorg-video-ati:amd64
在我的情况下,我从xorg-edgers PPA安装了fglrx驱动程序,删除这些软件包清除了我的升级。升级完成后,您可以再次完成设置专有驱动程序的过程。
第五种方案
在我的情况下,问题是由处于保持状态的包引起的。将其恢复到安装状态解决了问题。
放置或移除处于保持状态的包的可能方法是使用dpkg
。首先,获取所有包的当前状态,并将其放入文件中:
dpkg --get-selections > myselection
然后,编辑该文件并用hold
或vice-versa替换install
。最后,设置新选择:
sudo dpkg --set-selections < myselection
sudo apt-get update
sudo apt-get upgrade
How to hold a package back from being upgraded?中描述了其他方式
第六种方案
显然有一种简单的方法,只需将/raring
添加到每个包名称中,如下所示:
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
如果它不起作用,请尝试以下方法。
这是预期的,你有几个不是来自Ubuntu存储库的软件包对安装至关重要。你应该逐个降级它们(我还没有找到一种有效的方法),然后尝试升级。我将以一个为例:
$ 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
在你的情况下,应该出现这样的事情。您应该注意具有URL的版本,在这种情况下,2.4.43-0ubuntu1
具有http://archive.ubuntu.com/ubuntu/
,使用格式<package>=<version>
将该对保存在文本文件中。
如果你看到类似的东西:
fluxgui:
Installed: 1.1.8
Candidate: 1.1.8
Version table:
*** 1.1.8 0
100 /var/lib/dpkg/status
通知没有网址,然后可以删除该包:
sudo apt-get remove fluxgui
然后你完成你的列表应该看起来像:
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
(再次和例子,但你可能有一个想法)
完成列表后,键入sudo apt-get -f install
并粘贴完整列表,因此它应如下所示:
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
如果您想要更快一些,可以使用带有多个包名称的apt-cache policy libdrm2 libgbm1
。