1. 程式人生 > 其它 >[Linux] 瀏覽器不支援中文的問題解決

[Linux] 瀏覽器不支援中文的問題解決

技術標籤:Linux

環境是RHEL7.6,使用Firefox中文顯示如下,需要安裝中文支援

掛載iso安裝中文支援元件

1)掛載iso

[[email protected] rhel7iso]# mount /root/rhel7iso/rhel-server-7.6-x86_64-dvd.iso /mnt
mount: /dev/loop0 is write-protected, mounting read-only
[[email protected] rhel7iso]# cd /mnt
[[email protected] mnt]# ls
addons  EULA              GPL     isolinux  media.repo  repodata                 RPM-GPG-KEY-redhat-release
EFI     extra_files.json  images  LiveOS    Packages    RPM-GPG-KEY-redhat-beta  TRANS.TBL
[
[email protected]
mnt]#

2)配置yum源

[[email protected] yum.repos.d]# pwd
/etc/yum.repos.d
[[email protected] yum.repos.d]# cat chinese.repo
[CHINESE]
name=CHINESE
baseurl=file:///mnt
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[[email protected] yum.repos.d]#

3)安裝中文支援

yum groupinstall "fonts"

說明:安裝中文支援"Chinese Support" 提示沒有這個元件,原因是comps.xml沒有"Chinese Support"這個元件;解決方法:安裝“Fonts”

[[email protected] ~]# find / -name *comps.xml*
/var/cache/yum/x86_64/7Server/base1/gen/comps.xml
/var/cache/yum/x86_64/7Server/base1/a4e2b46586aa556c3b6f814dad5b16db5a669984d66b68e873586cd7c7253301-c7-x86_64-comps.xml.gz
/var/cache/yum/x86_64/7Server/CHINESE/gen/comps.xml
[
[email protected]
~]# [[email protected] ~]# grep "Chinese Support" /var/cache/yum/x86_64/7Server/base1/gen/comps.xml [[email protected] ~]# grep "Fonts" /var/cache/yum/x86_64/7Server/base1/gen/comps.xml <name>Fonts</name> <description>Fonts for rendering text in a variety of languages and scripts.</description> [[email protected] ~]#

使用yum groupinstall "fonts" 或yum groupinstall "Fonts" 都可以

[[email protected] ~]# cat /var/cache/yum/x86_64/7Server/base1/gen/comps.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE comps PUBLIC "-//CentOS//DTD Comps info//EN" "comps.dtd">
<comps>
…… 
 <group>
    <id>fonts</id>
    <name>Fonts</name>
    <name xml:lang="ar">ﺦﻃﻮﻃ</name>
    <name xml:lang="as">ফন্টসমূহ</name>
    <name xml:lang="bal">ﻑﻮﻨﺗ ﺂﻧ</name>
……

4)安裝完成, umount /mnt

參考資料:

CentOs7 無可用"Chinese Support" https://www.cnblogs.com/lideg/p/4286936.html
Centos YUM組安裝報錯解決 yum grouplist 提示: There is no installed groups filehttps://blog.csdn.net/qq43748322/article/details/103630858