我在 Ubuntu 系统中安装软件包时遇到问题。问题如下:
处理控制台数据时遇到错误
处理控制台通用时遇到错误 E: 子进程 /usr/bin/dpkg 返回错误代码 (1)
Jan 11 12:30:57 digitalWeapon systemd[1]: Failed to start The Ap Processing triggers for systemd (245.4-4ubuntu3.3) ... Processing triggers for man-db (2.9.1-1) ...
Processing triggers for ufw (0.36-6) ...
Errors were encountered while processing: console-data
console-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Fetched 338 kB in 2s (150 kB/s)
Selecting previously unselected package apache2-data.
(Reading database... 366640 files and directories currently installed.) Preparing to unpack .../apache2-data_2.4.41-4ubuntu3.1_all.deb ...
Unpacking apache2-data (2.4.41-4ubuntu3.1) ...
Selecting previously unselected package apache2-utils.
Preparing to unpack .../apache2-utils_2.4.41-4ubuntu3.1_amd64.deb ..
Unpacking apache2-utils (2.4.41-4ubuntu3.1) ...
Selecting previously unselected package apache2.
Preparing to unpack .../apache2_2.4.41-4ubuntu3.1_amd64.deb ...
Unpacking apache2 (2.4.41-4ubuntu3.1)
Setting up console-data (2:1.12-8) ...
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 1 21, <STDIN> line 374.
Looking for keymap to install:
console-data/keymap/full doesn't exist
Usage: install-keymap [ keymap_file | NONE | KERNEL ]
dpkg: error processing package console-data (--configure):
installed console-data package post-installation script subprocess returned error exit status 1 Setting up apache2-data (2.4.41-4ubuntu3.1) ...
Setting up apache2-utils (2.4.41-4ubuntu3.1) ...
dpkg: dependency problems prevent configuration of console-common:
console-common depends on console-data; however:
Package console-data is not configured yet.
dpkg: error processing package console-common (--configure): dependency problems - leaving unconfigured
Setting up apache2 (2.4.41-4ubuntu3.1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
答案1
我遇到了完全相同的错误,并通过删除 console-data 和 console-common 包并重新安装它们解决了该问题。
删除软件包
sudo apt remove --purge console-common console-data
再次安装软件包
sudo apt install console-common console-data
再次安装这些软件包时,它会询问处理键盘映射的策略。选择不要触摸键盘映射然后按回车键。
希望这可以帮助。