上网搜索Linux中文乱码问题,提示需要安装
fonts-chinese-3.02-12.el5.noarch.rpm
fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm
中文语言包
yum安装方式提示找不到,怀疑是网络问题,改用从网站
http://rpmfind.net/linux/rpm2html
下载,使用rpm安装方式
直接安装提示:缺少chkfontpath依赖包
安装依赖chkfontpath提示:
[root@RedHat-BG home]# rpm -ivh chkfontpath-1.10.1-7mdv2011.0.x86_64.rpm
warning: chkfontpath-1.10.1-7mdv2011.0.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 78d019f5: NOKEY
error: Failed dependencies:
xfs is needed by chkfontpath-1.10.1-7mdv2011.0.x86_64
[root@RedHat-BG home]# rpm -ivh xfs-1.1.2-1-mdv2012.0.x86_64.rpm
warning: xfs-1.1.2-1-mdv2012.0.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 26752624: NOKEY
error: Failed dependencies:
rpm-helper is needed by xfs-1.1.2-1.x86_64
fslsfonts is needed by xfs-1.1.2-1.x86_64
fstobdf is needed by xfs-1.1.2-1.x86_64
showfont is needed by xfs-1.1.2-1.x86_64
x11-server-common >= 1.4.0.90-13mdv is needed by xfs-1.1.2-1.x86_64
libxfont >= 1.2.8-2mdv is needed by xfs-1.1.2-1.x86_64
libc.so.6(GLIBC_2.14)(64bit) is needed by xfs-1.1.2-1.x86_64
libc.so.6(GLIBC_2.15)(64bit) is needed by xfs-1.1.2-1.x86_64
上网搜索找到这样一段文字:
安装
/bin/sh is needed by fonts-chinese-3.02-12.el5.noarch
/usr/sbin/chkfontpath is needed by fonts-chinese-3.02-12.el5.noarch
fontconfig is needed by fonts-chinese-3.02-12.el5.noarch
mkfontdir is needed by fonts-chinese-3.02-12.el5.noarch
ttmkfdir >= 3.0.6 is needed by fonts-chinese-3.02-12.el5.noarch
这几个提示你缺少依赖的包
这样再安装依赖包
[root@RedHat-BG home]# rpm -ivh rpm-helper-0.24.17-4.mga6.noarch.rpm
warning: rpm-helper-0.24.17-4.mga6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID 80420f66: NOKEY
error: Failed dependencies:
perl-base >= 2:5.22.1 is needed by rpm-helper-0.24.17-4.mga6.noarch
systemd-units is needed by rpm-helper-0.24.17-4.mga6.noarch
util-linux >= 2.24-1 is needed by rpm-helper-0.24.17-4.mga6.noarch
You have mail in /var/spool/mail/root
这样就陷入没完没了找依赖,上网搜索其他文章:xfs is needed by
找到:
centos/redhat中文支持安装
一般而言,我们在安装linux时可能没有安装中文字体,导致我们在使用不管是linux桌面还是命令行终端时,中文显示乱码,也不能输入中文。下面,我将交大家怎么在linux中安装中文字体并配置显示。
软件包,http://pan.baidu.com/s/1qW2TE7i
可能要使用的软件
-
chkfontpath-1.10.1-1.1.i386.rpm
fonts-chinese-3.02-12.el5.noarch.rpm
fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm
libFS-1.0.0-3.1.i386.rpm
ttmkfdir-3.0.9-23.el5.i386.rpm
xorg-x11-xfs-1.0.2-4.i386.rpm
其中
fonts-chinese-3.02-12.el5.noarch.rpm
fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm
这两个是最主要的。
-
直接安装这两个软件
-
rpm -ivh fonts-chinese-3.02-12.el5.noarch.rpm
rpm -ivh fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm
-
但如果你之前没有安装xwindow,可能在安装第一个软件时就会出错,如下图。
-
我们再安装错误中出现的软件,又会出现报错。如图。
-
这时,需要安装更多的依赖软件。我们依次安装
rpm -ivh ./libFS-1.0.0-3.1.i386.rpm
rpm -ivh ./ttmkfdir-3.0.9-23.el5.i386.rpm
-
-
然后将下面两个软件一起安装,不然会出现循环依赖。
rpm -ivh ./chkfontpath-1.10.1-1.1.i386.rpm ./xorg-x11-xfs-1.0.2-4.i386.rpm
-
-
然后再依次安装第二步中的两个软件。
rpm -ivh fonts-chinese-3.02-12.el5.noarch.rpm
rpm -ivh fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm
-
安装完成之后,重启系统。在登录时可以从最下面,选择桌面系统中显示中文。
-
-
-
-
-
-
-
-
-
如果要在命令行终端中显示中文、在xshell中显示、输入中文,则需要修改/etc/sysconfig/i18n文件
修改字体文档
#vi /etc/sysconfig/i18n
将LANG="en_US.UTF-8"SYSFONT="latarcyrheb-sun16"修改原内容为LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"
-
-
-
效果如下
-
其实还有第二种简单的方法
yum -y groupinstall chinese-support
这样自动安装。
版本问题造成冲突
[root@RedHat-BG home]# rpm -ivh ./libFS-1.0.7-6.fc27.i686.rpm
warning: ./libFS-1.0.7-6.fc27.i686.rpm: Header V3 RSA/SHA256 Signature, key ID f5282ee4: NOKEY
error: Failed dependencies:
libc.so.6(GLIBC_2.15) is needed by libFS-1.0.7-6.fc27.i686
[root@RedHat-BG home]# rpm -ivh glibc-2.17-5.mga3.x86_64.rpm \
> ^C
[root@RedHat-BG home]# rpm -ivh glibc-2.17-5.mga3.x86_64.rpm \
> ^C
[root@RedHat-BG home]# rpm -ivh glibc-2.17-5.mga3.x86_64.rpm
warning: glibc-2.17-5.mga3.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 80420f66: NOKEY
error: Failed dependencies:
dash-static is needed by glibc-6:2.17-5.mga3.x86_64
/usr/bin/dash.static is needed by glibc-6:2.17-5.mga3.x86_64
prelink < 1:0.4.2-1.20091104.1 conflicts with glibc-6:2.17-5.mga3.x86_64
kernel < 2.6.33 conflicts with glibc-6:2.17-5.mga3.x86_64
[root@RedHat-BG home]# rpm -ivh glibc-2.14.1-11.2.mga2.x86_64.rpm
warning: glibc-2.14.1-11.2.mga2.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 80420f66: NOKEY
error: Failed dependencies:
dash-static is needed by glibc-6:2.14.1-11.2.mga2.x86_64
/bin/dash.static is needed by glibc-6:2.14.1-11.2.mga2.x86_64
prelink < 1:0.4.2-1.20091104.1 conflicts with glibc-6:2.14.1-11.2.mga2.x86_64
[root@RedHat-BG home]# rpm -ivh dash-static-0.5.9-1.mga6.x86_64.rpm
warning: dash-static-0.5.9-1.mga6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 80420f66: NOKEY
Preparing... ########################################### [100%]
1:dash-static ########################################### [100%]
[root@RedHat-BG home]# rpm -ivh glibc-2.14.1-11.2.mga2.x86_64.rpm
warning: glibc-2.14.1-11.2.mga2.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 80420f66: NOKEY
error: Failed dependencies:
prelink < 1:0.4.2-1.20091104.1 conflicts with glibc-6:2.14.1-11.2.mga2.x86_64
[root@RedHat-BG home]# rpm -ivh ./libFS-1.0.7-6.fc27.i686.rpm
warning: ./libFS-1.0.7-6.fc27.i686.rpm: Header V3 RSA/SHA256 Signature, key ID f5282ee4: NOKEY
error: Failed dependencies:
libc.so.6(GLIBC_2.15) is needed by libFS-1.0.7-6.fc27.i686
[root@RedHat-BG home]# rpm -ivh glibc-2.16.90-3-mdv2012.0.x86_64.rpm
warning: glibc-2.16.90-3-mdv2012.0.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 26752624: NOKEY
error: Failed dependencies:
prelink < 1:0.4.2-1.20091104.1mdv2010.1 conflicts with glibc-6:2.16.90-3.x86_64
[root@RedHat-BG home]# rpm -ivh libc6-2.16.90-3-mdv2012.0.x86_64.rpm
warning: libc6-2.16.90-3-mdv2012.0.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 26752624: NOKEY
error: Failed dependencies:
glibc < 6:2.14.90-13 conflicts with libc6-6:2.16.90-3.x86_64
[root@RedHat-BG home]# rpm -ivh libFS-1.0.7-6.fc27.i686.rpm
warning: libFS-1.0.7-6.fc27.i686.rpm: Header V3 RSA/SHA256 Signature, key ID f5282ee4: NOKEY
error: Failed dependencies:
libc.so.6(GLIBC_2.15) is needed by libFS-1.0.7-6.fc27.i686
冲突问题的搜索: