防止 *buntu 在安装过程中更新字典

防止 *buntu 在安装过程中更新字典

在使用 Vagrant 安装带有 GUI(lxde)的 Ubuntu 服务器机箱时,由于设置字典时经常出现的问题,shell 配置失败。

所有解决方案似乎都指向在错误发生后运行脚本,但这破坏了我所追求的流畅自动化脚本。

有什么方法可以阻止这个步骤发生(-q -y如果相关的话,我的所有 apt-get 安装都是用 运行的)。

这与 X11 或特定桌面有关吗?我不介意更改 DE 来解决这个问题...

流浪日志:

==> development_environment: Setting up dictionaries-common (1.12.1ubuntu2) ...
==> development_environment: update-default-wordlist: Question empty but elements installed for class "wordlist"
==> development_environment:   dictionaries-common/default-wordlist: return code: "0", value: ""
==> development_environment:   Choices: , Manual symlink setting
==> development_environment:   shared/packages-wordlist: return code: "10" owners/error: "shared/packages-wordlist doesn't exist"
==> development_environment:   Installed elements: english (Webster's Second International English wordlist)
==> development_environment: 
==> development_environment:   Please see "/usr/share/doc/dictionaries-common/README.problems", section
==> development_environment:   "Debconf database corruption" for recovery info.
==> development_environment: update-default-wordlist: Selected wordlist "" 
==> development_environment: does not correspond to any installed package in the system
==> development_environment: and no alternative wordlist could be selected.
==> development_environment: dpkg: error processing dictionaries-common (--configure):
==> development_environment:  subprocess installed post-installation script returned error exit status 255
==> development_environment: dpkg: dependency problems prevent configuration of miscfiles:
==> development_environment:  miscfiles depends on dictionaries-common (>= 0.20); however:
==> development_environment:   Package dictionaries-common is not configured yet.
==> development_environment: dpkg: error processing miscfiles (--configure):
==> development_environment:  dependency problems - leaving unconfigured
==> development_environment: No apport report written because the error message indicates its a followup error from a previous failure.
==> development_environment: Errors were encountered while processing:
==> development_environment:  dictionaries-common
==> development_environment:  miscfiles
==> development_environment: E: Sub-process /usr/bin/dpkg returned an error code (1)
==> development_environment: 
==> development_environment: (lxsession:1514): Gtk-WARNING **: cannot open display: 
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell

Stdout from the command:

Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  libfs6 libglu1-mesa x11-apps x11-session-utils x11-xfs-utils xfonts-scalable
  xinit xinput xorg-docs-core
Suggested packages:
  mesa-utils xorg-docs xfonts-100dpi xfonts-75dpi
The following NEW packages will be installed:
  libfs6 libglu1-mesa x11-apps x11-session-utils x11-xfs-utils xfonts-scalable
  xinit xinput xorg xorg-docs-core
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 1,448 kB of archives.
After this operation, 4,064 kB of additional disk space will be used.
Do you want to continue [Y/n]? Abort.
Reading package lists...
Building dependency tree...
Reading state information...
lxde is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up dictionaries-common (1.12.1ubuntu2) ...


Stderr from the command:

stdin: is not a tty
update-default-wordlist: Question empty but elements installed for class "wordlist"
  dictionaries-common/default-wordlist: return code: "0", value: ""
  Choices: , Manual symlink setting
  shared/packages-wordlist: return code: "10" owners/error: "shared/packages-wordlist doesn't exist"
  Installed elements: english (Webster's Second International English wordlist)

  Please see "/usr/share/doc/dictionaries-common/README.problems", section
  "Debconf database corruption" for recovery info.

update-default-wordlist: Selected wordlist "" 
does not correspond to any installed package in the system
and no alternative wordlist could be selected.
dpkg: error processing dictionaries-common (--configure):
 subprocess installed post-installation script returned error exit status 255
dpkg: dependency problems prevent configuration of miscfiles:
 miscfiles depends on dictionaries-common (>= 0.20); however:
  Package dictionaries-common is not configured yet.
dpkg: error processing miscfiles (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
 dictionaries-common
 miscfiles
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

在没有任何答案的情况下,我只是转而使用 Fluxbox,这使得脚本可以顺利地继续进行 GUI 启动和后续安装脚本。

相关内容