所以我今天早上刚刚开始自动升级我的 Ubuntu 发行版,从 15.xx 到新的 16.04,一切都很顺利,除了最后出现的错误:某些东西阻止了键盘配置包的完整安装(没有得到错误的屏幕截图)。
它还提到,由于安装无法完成,因此已恢复。我重新启动了计算机,在登录屏幕上我立即看到了两件事:
它使用默认分辨率,没有增加分辨率的选项(并且只检测到我的两个屏幕中的一个),这意味着显示驱动程序可能无法正常工作。
它表明它正在使用 16.04 发行版,因此看起来它毕竟已经更新了。
然后我进入终端,尝试找出为什么我的显示器不能正常工作,当安装最新的 nvidia 驱动程序时,由于键盘配置包,我收到了一堆错误。
我尝试通过执行以下操作将其删除并重新安装:
sudo apt-get rempove keyboard-configuration
sudo apt-get install keyboard-configuration
它不起作用,这是我在安装过程中收到的错误:
Setting up keyboard-configuration (1.142ubuntu2) ...
/usr/local/bin/setupcon: 806: /usr/local/bin/setupcon: /usr/local/bin/ckbcomp: not found
dpkg: error processing package keyboard-configuration (--configure):
subprocess installed post-installation script returned error exit status 1
我查看了 ckbcomp 文件是什么,它似乎来自控制台安装包,但如果我尝试安装这个包,我会得到与上面相同的错误,并且还有一些其他失败的包:
$ sudo apt-get install console-setup
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libxatracker2 libxfont1 libxvmc1 xfonts-base xfonts-encodings xfonts-utils xserver-common
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
console-setup-linux kbd
The following NEW packages will be installed:
console-setup console-setup-linux kbd
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,316 kB of archives.
After this operation, 2,975 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Selecting previously unselected package kbd.
(Reading database ... 412842 files and directories currently installed.)
Preparing to unpack .../kbd_2.0.3-2ubuntu1_amd64.deb ...
Unpacking kbd (2.0.3-2ubuntu1) ...
Selecting previously unselected package console-setup-linux.
Preparing to unpack .../console-setup-linux_1.142ubuntu2_all.deb ...
Unpacking console-setup-linux (1.142ubuntu2) ...
Selecting previously unselected package console-setup.
Preparing to unpack .../console-setup_1.142ubuntu2_all.deb ...
Unpacking console-setup (1.142ubuntu2) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-5ubuntu1) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Setting up keyboard-configuration (1.142ubuntu2) ...
/usr/local/bin/setupcon: 806: /usr/local/bin/setupcon: /usr/local/bin/ckbcomp: not found
dpkg: error processing package keyboard-configuration (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of console-setup:
console-setup depends on keyboard-configuration (= 1.142ubuntu2); however:
Package keyboard-configuration is not configured yet.
dpkg: error processing package console-setup (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of kbd:
kbd depends on console-setup | console-setup-mini; however:
Package console-setup is not configured yet.
Package console-setup-mini is not installed.
dpkg: error processing package kbd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of console-setup-linux:
console-setup-linux depends on kbd (>= 1.15-1ubuntu3); however:
Package kbd is not configured yet.
console-setup-linux depends on keyboard-configuration (= 1.142ubuntu2); however:
Package keyboard-configuration is not configured yet.
dpkg: error processing package console-setup-linux (--configure):
dependency probNo apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
lems - leaving unconfigured
Errors were encountered while processing:
keyboard-configuration
console-setup
kbd
console-setup-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)
有办法让它工作吗? 想听听大家的意见,我对 Linux 不太熟悉,所以这可能是我做错了什么。 更新前系统非常稳定,从未出现过任何问题。