|
每次升级都是这样错误提示如下,不知道怎么配置才行
您希望继续执行吗?[Y/n]y
正在设置 console-data (2002.12.04dbs-49ubuntu4) ...
Can't call method "choices" on an undefined value at /usr/share/perl5/Debconf/Question.pm line 85, <GEN1> line 5.
dpkg:处理 console-data (--configure)时出错:
子进程·post-installation script·返回了错误号·9
dpkg:依赖关系问题使得 base-config 的配置工作不能继续:
base-config 依赖于 console-data (>= 2002.12.04dbs-16);然而:
软件包 console-data还没有被配置。
dpkg:处理 base-config (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 ubuntu-minimal 的配置工作不能继续:
ubuntu-minimal 依赖于 base-config;然而:
软件包 base-config还没有被配置。
dpkg:处理 ubuntu-minimal (--configure)时出错:
依赖关系问题 - 仍未被配置
在处理时有错误发生:
console-data
base-config
ubuntu-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)
下面是我电脑中的/usr/share/perl5/Debconf/Question.pm ,
#!/usr/bin/perl -w
# This file was preprocessed, do not edit!
package Debconf:uestion;
use strict;
use Debconf:b;
use Debconf::Template;
use Debconf::Iterator;
use Debconf:og qw(:all);
use fields qw(name priority);
our %question;
sub new {
my Debconf:uestion $this=shift;
my $name=shift;
my $owner=shift;
my $type=shift || die "no type given for question";
die "A question called \"$name\" already exists"
if exists $question{$name};
unless (ref $this) {
$this = fields::new($this);
}
$this->{name}=$name;
return unless defined $this->addowner($owner, $type);
$this->flag('seen', 'false');
return $question{$name}=$this;
}
sub get {
my Debconf:uestion $this=shift;
my $name=shift;
return $question{$name} if exists $question{$name};
if ($Debconf:b::config->exists($name)) {
$this = fields::new($this);
$this->{name}=$name;
return $question{$name}=$this;
}
return undef;
}
sub iterator {
my $this=shift;
my $real_iterator=$Debconf:b::config->iterator;
return Debconf::Iterator->new(callback => sub {
return unless my $name=$real_iterator->iterate;
return $this->get($name);
});
}
sub _expand_vars {
my $this=shift;
my $text=shift;
return '' unless defined $text;
my @vars=$Debconf:b::config->variables($this->{name});
my $rest=$text;
my $result='';
my $variable;
my $varval;
my $escape;
while ($rest =~ m/^(.*?)(\\)?\${([^{}]+)}(.*)$/sg) {
$result.=$1; # copy anything before the variable
$escape=$2;
$variable=$3;
$rest=$4; # continue trying to expand rest of text
if (defined $escape && length $escape) {
$result.="\${$variable}";
}
else {
$varval=$Debconf:b::config->getvariable($this->{name}, $variable);
$result.=$varval if defined($varval); # expand the variable
}
}
$result.=$rest; # add on anything that's left.
return $result;
}
sub description {
my $this=shift;
return $this->_expand_vars($this->template->description);
}
sub extended_description {
my $this=shift;
return $this->_expand_vars($this->template->extended_description);
}
sub choices {
my $this=shift;
DarkOrange]return $this->_expand_vars($this->template->choices);
}
sub choices_split {
my $this=shift;
return split(/,\s+/, $this->choices);
}
sub variable {
my $this=shift;
my $var=shift;
if (@_) {
return $Debconf:b::config->setvariable($this->{name}, $var, shift);
}
else {
return $Debconf:b::config->getvariable($this->{name}, $var);
}
}
sub flag {
my $this=shift;
my $flag=shift;
if ($flag eq 'isdefault') {
debug developer => "The isdefault flag is deprecated, use the seen flag instead";
if (@_) {
my $value=(shift eq 'true') ? 'false' : 'true';
$Debconf:b::config->setflag($this->{name}, 'seen', $value);
}
return ($Debconf:b::config->getflag($this->{name}, 'seen') eq 'true') ? 'false' : 'true';
}
if (@_) {
return $Debconf:b::config->setflag($this->{name}, $flag, shift);
}
else {
return $Debconf::Db::config->getflag($this->{name}, $flag);
}
}
sub value {
my $this = shift;
unless (@_) {
my $ret=$Debconf::Db::config->getfield($this->{name}, 'value');
return $ret if defined $ret;
return $this->template->default if ref $this->template;
} else {
return $Debconf::Db::config->setfield($this->{name}, 'value', shift);
}
}
sub value_split {
my $this=shift;
my $value=$this->value;
$value='' if ! defined $value;
return split(/,\s+/, $value);
}
sub addowner {
my $this=shift;
return $Debconf::Db::config->addowner($this->{name}, shift, shift);
}
sub removeowner {
my $this=shift;
my $template=$Debconf::Db::config->getfield($this->{name}, 'template');
return unless $Debconf::Db::config->removeowner($this->{name}, shift);
if (length $template and
not $Debconf::Db::config->exists($this->{name})) {
$Debconf::Db::templates->removeowner($template, $this->{name});
delete $question{$this->{name}};
}
}
sub owners {
my $this=shift;
return join(", ", sort($Debconf::Db::config->owners($this->{name})));
}
sub template {
my $this=shift;
if (@_) {
my $oldtemplate=$Debconf::Db::config->getfield($this->{name}, 'template');
my $newtemplate=shift;
if (not defined $oldtemplate or $oldtemplate ne $newtemplate) {
$Debconf::Db::templates->removeowner($oldtemplate, $this->{name})
if defined $oldtemplate and length $oldtemplate;
$Debconf::Db::config->setfield($this->{name}, 'template', $newtemplate);
$Debconf::Db::templates->addowner($newtemplate, $this->{name},
$Debconf::Db::templates->getfield($newtemplate, "type"));
}
}
return Debconf::Template->get(
$Debconf::Db::config->getfield($this->{name}, 'template'));
}
sub name {
my $this=shift;
return $this->{name};
}
sub priority {
my $this=shift;
$this->{priority}=shift if @_;
return $this->{priority};
}
sub AUTOLOAD {
(my $field = our $AUTOLOAD) =~ s/.*://;
no strict 'refs';
*$AUTOLOAD = sub {
my $this=shift;
if (@_) {
return $Debconf::Db::config->setfield($this->{name}, $field, shift);
}
my $ret=$Debconf::Db::config->getfield($this->{name}, $field);
return $ret if defined $ret;
return $this->template->$field() if ref $this->template;
};
goto &$AUTOLOAD;
}
sub DESTROY {
}
1
请高手指点 |
|