Debian Lenny 到 Debian Squeeze 升级问题

Debian Lenny 到 Debian Squeeze 升级问题

昨天,我在我的 Debian Lenny 服务器上进行了 dist-upgrade。我以为这会像通常的升级一样简单,但事实并非如此。更新后我遇到了很多问题:

# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 linux-image-2.6-amd64 : Depends: linux-image-2.6.32-5-amd64 but it is not installed
E: Unmet dependencies. Try using -f.

然后我尝试了这个建议:

# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libio-compress-base-perl libatk1.0-0 libts-0.0-0 libmime-types-perl libc-client2007b libgtk2.0-common libxfixes3 libgsf-1-common
  hicolor-icon-theme libfile-remove-perl libxcomposite1 libltdl3-dev libneon27 libmd5-perl libwmf0.2-7 libilmbase6 libatk1.0-data
  djvulibre-desktop libdirectfb-1.0-0 fam libxinerama1 libcroco3 libopenexr6 libgsf-1-114 libmail-box-perl libdjvulibre21
  openssl-blacklist librsvg2-2 libio-compress-zlib-perl libsysfs2 libbeecrypt6 libxdamage1 libobject-realize-later-perl
  libuser-identity-perl libgtk2.0-bin libxi6 libxcursor1 portmap libxrandr2 libgtk2.0-0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-image-2.6.32-5-amd64
Suggested packages:
  linux-doc-2.6.32
The following NEW packages will be installed:
  linux-image-2.6.32-5-amd64
0 upgraded, 1 newly installed, 0 to remove and 121 not upgraded.
98 not fully installed or removed.
Need to get 0 B/28.6 MB of archives.
After this operation, 103 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "hu_HU.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: Nincs ilyen f?jl vagy k?nyvt?r
Preconfiguring packages ...
(Reading database ... 37915 files and directories currently installed.)
Unpacking linux-image-2.6.32-5-amd64 (from .../linux-image-2.6.32-5-amd64_2.6.32-30_amd64.deb) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: Nincs ilyen f?jl vagy k?nyvt?r
dpkg: error processing /var/cache/apt/archives/linux-image-2.6.32-5-amd64_2.6.32-30_amd64.deb (--unpack):
 failed in write on buffer copy for backend dpkg-deb during `./lib/modules/2.6.32-5-amd64/kernel/sound/pci/hda/snd-hda-codec-realtek.ko': No space left on device
configured to not write apport reports
                                      dpkg-deb: subprocess paste killed by signal (Broken pipe)
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: Nincs ilyen f?jl vagy k?nyvt?r
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.26-2-amd64
Updating /boot/grub/menu.lst ... done

Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-2.6.32-5-amd64_2.6.32-30_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

# dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "hu_HU.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: Nincs ilyen f?jl vagy k?nyvt?r
/usr/sbin/dpkg-reconfigure: locales is broken or not fully installed

然后我就卡住了。你知道我该如何解决这个问题吗?

答案1

你需要阅读发行说明在升级到新版本的 Debian 之前。如果您只是盲目升级而没有阅读发行说明并遵循说明,则可能会损坏您的系统。

这是来自 IRC 帮助频道的快速版本。

从 /etc/apt/sources.list 中删除 volatile 和 backports,并将 lenny 改为 squeeze。

使用 apt-get 进行升级:apt-get update && apt-get upgrade && apt-get install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') udev

如果需要,请安装 firmware-linux-nonfree;检查您是否安装了 2.6.32 内核aptitude search '~nlinux-image~i'并重新启动 apt-get dist-upgrade

如果您没有按顺序执行这些步骤,最终可能会导致系统崩溃,因为内核和 udev 需要先升级。

答案2

尝试这个:

 apt-get update
 apt-get install --reinstall debconf glibc locales
 dpkg-reconfigure locales

您也可以尝试aptitude(如果已安装),启动时按 u,然后按 ok,然后按 g,最后再按一次 g,它将尝试修复它

答案3

这对我来说很有效:

apt-get update
apt-get dist-upgrade
apt-get install --reinstall debconf locales-all
a reboot

答案4

如果你

export LANG=C

在运行命令之前,在您的 shell 中。这应该可以防止尝试以匈牙利语运行并失败。这样,您应该能够重新配置语言环境以使其生成正确的 hu_HU.UTF-8 语言环境。

相关内容