升级 Ubuntu
要从 Ubuntu 13.10 升级到 14.04,我运行了sudo do-release-upgrade
。第一次尝试失败,我在错误日志中发现以下消息:
/var/log/dist-upgrade/20140724-1529/main.log:
ERROR Dist-upgrade failed: 'The package 'postgresql-9.3-postgis-2.1' is marked
for removal but it is in the removal blacklist.'
成功卸载软件包后,我重新运行了升级。
最初的问题
我重新启动了计算机,然后它停止启动并显示以下屏幕输出:
* Starting nginx nginx
speech-dispatcher disabled; edit /etc/default/speech-dispatcher
Starting VirtualBox kernel modules ...done.
saned disabled; edit /etc/default/saned
* Restoring resolver state
* Starting web server apache2
*
尝试启动 UI
我尝试从控制台启动 UI 运行:sudo service lightdm start
但失败并显示以下消息:
作业启动失败
查看后/var/log/lightdm/
我发现以下错误:
x-0-greeter.log:
WARNING: Cannot open pixbuf loader module file '/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0 \
/2.10.0/loaders.cache': Datei oder Verzeichnis nicht gefunden.
This likely means that your installation is broken
Try running the command
gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache \
to make thinks work again for the time being
WARNING: Error loading image 'file:///usr/share/themes/Ambiance/gtk-3.0/assets/entry.png':
Format der Bilddatei unbekannt
WARNING: Error loading image 'file:///usr/share/themes/Ambiance/gtk-3.0/assets/ \
entry-disabled.png': Format der Bilddatei unbekannt
/usr/sbin/unity-greeter: symbol lookup error: /usr/lib/x86_64-linux-gnu/libgdk-3.so.0:
undefined symbol: cairo_surface_set_device_scale
** (gnome-settings-daemon:2614): WARNING **: Could not open X display
..
x-0.log:
Loading extension GLX
modprobe: ERROR: ../libkmod/libkmod-module.c:809 kmod_module_insert_module() could
not find module by name='nvidia_311'
modprobe: ERROR: could not insert 'nvidia_331': Function not implemented
error setting MTRR (base = 0xf3000000, size = 0x00e00000, type = 1) Invalid argument (22)
图形驱动程序
几周前我按照说明换了另一个图形驱动程序这里.
按照建议这里我从他们的网站下载了我的显卡的最新 NVidia 驱动程序并运行以下命令:
sudo ./NVIDIA-Linux-x86_64-331.79.run
但是,安装程序停止并显示以下消息:
发行版提供的预安装脚本失败!是否继续安装?[是] [否]
我NO
目前已经选择了。
运行 apt-get
接下来我决定跑步sudo apt-get -f install
。
在执行某项操作的过程中,它停止了,并显示以下消息:
Setting up nvidia-331 (331.38-0ubuntu7) ...
Configuration file '/etc/init/nvidia-persistenced.conf'
==> Deleted (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** nvidia-persistenced,conf (Y/I/N/O/D/Z) [default=N] ?
我选择这样做是Y
因为我对安装的东西不太走运,正如你可能猜到的那样。
部分成功
重新启动系统后,用户界面启动了!
但是,当我在登录字段输入密码时什么都没发生。而且登录字段看起来有点奇怪 - 用户名几乎无法辨认 - 好像缺少背景图形(见屏幕截图)。
然后我运行sudo apt-get install --reinstall ubuntu-session
并重新启动。现在我可以登录了。
剩下的问题是:窗口管理器好像坏了。我看不到 Unity 仪表板、窗口菜单栏……
显卡驱动噩梦(第二部分)
同时,我决定不顾警告,安装前面提到的驱动程序:
sudo ./NVIDIA-Linux-x86_64-331.79.run
现在,系统启动了:我可以看到 shell 登录提示一秒钟,但没有 UI,屏幕保持黑色。当我按下电源按钮时,系统关闭(我可以看到例程)。我可以不再访问 shell通过Ctrl+ Alt+ F1。好像我搞砸了 :(
/var/log/syslog 中的错误或警告
Jul 30 09:28:23 E6500 kernel: [ 186.883606] traps: compiz[2666] trap int3 ip:7f97c4279c13 sp:7fff48a43bf0 error:0
Jul 30 09:28:25 E6500 gnome-session[2560]: WARNING: Application 'compiz.desktop' killed by signal 5
Jul 30 09:28:25 E6500 gnome-session[2560]: WARNING: App 'compiz.desktop' respawning too quickly
Jul 30 09:28:25 E6500 gnome-session[2560]: CRITICAL: We failed, but the fail whale is dead. Sorry....
Jul 30 09:28:26 E6500 kernel: [ 189.550661] traps: compiz[3059] trap int3 ip:7fb39f46ec13 sp:7fff38ee5170 error:0
Jul 30 09:28:26 E6500 gnome-session[2560]: WARNING: App 'compiz.desktop' respawning too quickly
Jul 30 09:28:26 E6500 gnome-session[2560]: WARNING: Application 'compiz.desktop' killed by signal 5
Jul 30 09:28:26 E6500 gnome-session[2560]: WARNING: App 'compiz.desktop' respawning too quickly
答案1
这是一个错误(#1336467 compiz 陷阱 int3) 已在更新中修复。
(如果您无法使用 ctrl-alt-f1 访问虚拟终端,则使用text
内核参数启动并登录到文本终端)
在终端中执行:
sudo apt-get purge --remove nvidia*
sudo apt-get update && sudo dist-upgrade
sudo apt-get install nvidia-current
答案2
问题在于专有的 NVIDIA 驱动程序。
当您在登录屏幕时按++Ctrl并登录。AltF1
然后执行以下命令:
sudo apt-get purge nvidia* && sudo apt-get -y autoremove sudo apt-get install -y nvidia-331 && sudo apt-get shutdown -r now
这将删除 NVIDIA 的所有内容并安装来自 Ubuntu 的最新 NVIDIA 驱动程序。