Ubuntu Natty 11.04 从光盘离线安装KDE桌面环境问题排查指南


阅读 2 次

问题现象描述

在Ubuntu 11.04 Natty系统(默认使用Unity桌面环境)中,尝试通过Kubuntu 11.04安装光盘添加KDE桌面环境时,执行apt-cdrom add命令出现以下错误:

Using CD-ROM mount point /media/apt/
Identifying.. [ce3c168e46b345c6adc05b209f603d08-2]
Scanning disc for index files..

E: Unable to stat the mount point /media/Kubuntu\04011.04\040amd64/ - stat (2: No such file or directory)
E: Unable to stat the mount point /media/Kubuntu\04011.04\040amd64/ - stat (2: No such file or directory)

初步排查

检查/etc/fstab文件发现光盘设备未被自动挂载:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda5 during installation
UUID=d8caef34-1670-4525-a5b5-df889f62aa1e /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda7 during installation
UUID=7b71d3a8-bbea-477e-8b04-0c9651d0e12e /home           ext4    defaults        0       2
# /windows was on /dev/sda3 during installation
UUID=CC523DE8523DD7C2 /windows        ntfs    defaults,umask=007,gid=46 0       0
# swap was on /dev/sda6 during installation
UUID=3a281560-f3aa-4795-b396-0810e1eb15e2 none            swap    sw              0       0

解决方案

以下是完整的解决步骤:

1. 手动挂载光盘

首先创建挂载点并手动挂载光盘:

sudo mkdir -p /media/cdrom
sudo mount /dev/cdrom /media/cdrom

2. 检查光盘内容

验证光盘是否包含有效的软件包:

ls -l /media/cdrom/pool/main/ | grep kde

3. 添加光盘源

使用正确的挂载路径执行命令:

sudo apt-cdrom -d=/media/cdrom add

4. 安装KDE桌面环境

更新软件源并安装KDE:

sudo apt-get update
sudo apt-get install kubuntu-desktop

常见问题补充

如果遇到依赖问题,可以尝试:

sudo apt-get -f install
sudo dpkg --configure -a

安装完成后,在登录界面选择KDE Plasma会话即可切换桌面环境。

替代方案

如果光盘损坏,可以考虑下载最小化安装包:

sudo apt-get install --no-install-recommends kubuntu-desktop