定制Ubuntu最小发行版系统过程中出现的问题及解决...(持续更新)
1。进入自己创建的最小系统后,运行以下命令出现问题:
sudo mkdir xxx
sudo : unable to resolve host localhost.localdomain
解决办法:
sudo hostname xxx # xxx为要设置的主机名字
2。sudo 权限不能使用
解决办法:
sudoedit vim /etc/sudoers # 添加xxx用户为sudo权限
----------------------------------------------------------------
root ALL=(ALL) ALL
xxx ALL=(ALL) ALL
----------------------------------------------------------------
3。在进入最小系统,安装包过渡阶段时,会出现版本交叉混乱的关系,安装一个软件包出现以下错误:
sudo apt-get install grep # 比如安装一个grep软件包
...
Unpacking grep (from .../grep_2.5.4-4_mipsel.deb) ...
dpkg: error processing /var/cache/apt/archives/grep_2.5.4-4_mipsel.deb (--unpack):
trying to overwrite '/usr/share/info/dir.gz', which is also in package cpio 0:2.10-1ubuntu1
Processing triggers for install-info ...
install-info: warning: no info dir entry in `/usr/share/info/dir.gz.bak'
Errors were encountered while processing:
/var/cache/apt/archives/grep_2.5.4-4_mipsel.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
解决办法:
sudo vim /var/lib/dpkg/info/cpio.list
----------------------------------------------------------------
#/usr/share/info/dir.gz # 屏蔽或删除这一行
----------------------------------------------------------------
4。系统定制后不能显示中文
解决办法:
sudo vim /etc/environment # 打开环境变量设置文件添加以下环境变量
----------------------------------------------------------------
export LANG="zh_CN.UTF8"
export LANGUAGE="zh_CN.UTF8"
export LC_ALL="zh_CN.UTF8"
----------------------------------------------------------------
5。时间和时区显示不正确
解决办法:
sudo rm -f /etc/localtime
sudo ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime # 建立上海时区的软链接
重起系统后,系统的时间就显示正确了!
6。KDE系统出现 “X: user not authorized to run the X server, aborting.”问题
解决办法:
进入“安全模式”,在shell命令行下,删除以下文件:
rm /home/自己的用户名/.ICEauthority
rm /home/自己的用户名/.Xauthority
exit
在登陆对话框里,选择“KDE"环境登陆,问题既可解决。
7。NTFS系统不能手动挂载
运行以下命令的时候,出现以下问题:
sudo mount -t ntfs /dev/sdb1 /mnt/640GB/
NTFS signature is missing.
Failed to mount '/dev/sdb1': Invalid argument
The device '/dev/sdb1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
解决办法:
sudo apt-get install ntfs-3g ntfs-config
sudo mkfs.ntfs /dev/sdb1 -f # 对sdb1只有在linux进行强制快速格式化后才识别
Cluster size has been automatically set to 4096 bytes.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.
(如果沒有 mkfs.ntfs 这个命令,就 $ apt-get install ntfsprogs 然后在 $ ldconfig )
mount -t ntfs /dev/sdb1 /mnt/640GB/ # 挂载成功
阅读(1759) | 评论(0) | 转发(0) |