CentOS: LaTeX Error: File `xeCJK.sty’ not found


LaTeX Error: File `xeCJK.sty’ not found

Sample error:

[root@tutorialspots pdf]# pandoc --pdf-engine=xelatex -V CJKmainfont="Noto Sans CJK TC" -f epub "file.epub" -o "file.pdf"
Error producing PDF.
! LaTeX Error: File `xeCJK.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
! Emergency stop.
<read *>

l.24     \setCJKmainfont

Step 1: find package

[root@tutorialspots pdf]# yum whatprovides '*/xeCJK.sty' --disablerepo=mariadb
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.fra1.de.leaseweb.net
 * epel: mirror.23m.com
 * extras: centosmirror.netcup.net
 * remi-php72: mirror.dogado.de
 * remi-safe: mirror.dogado.de
 * updates: centosmirror.netcup.net
2:texlive-xecjk-svn28816.3.1.2-45.el7.noarch : Support for CJK documents in XeLaTeX
Repo        : base
Matched from:
Filename    : /usr/share/texlive/texmf-dist/tex/xelatex/xecjk/xeCJK.sty

Step 2: install texlive-xecjk

[root@tutorialspots pdf]# yum install texlive-xecjk
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.fra1.de.leaseweb.net
 * epel: mirror.23m.com
 * extras: centosmirror.netcup.net
 * remi-php72: mirror.dogado.de
 * remi-safe: mirror.dogado.de
 * updates: centosmirror.netcup.net
http://yum.mariadb.org/10.3/centos7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

Resolving Dependencies
--> Running transaction check
---> Package texlive-xecjk.noarch 2:svn28816.3.1.2-45.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================
 Package                                   Arch                               Version                                                Repository                        Size
============================================================================================================================================================================
Installing:
 texlive-xecjk                             noarch                             2:svn28816.3.1.2-45.el7                                base                              39 k

Transaction Summary
============================================================================================================================================================================
Install  1 Package

Total download size: 39 k
Installed size: 128 k
Is this ok [y/d/N]: y
Downloading packages:
texlive-xecjk-svn28816.3.1.2-45.el7.noarch.rpm                                                                                                       |  39 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:texlive-xecjk-svn28816.3.1.2-45.el7.noarch                                                                                                             1/1
  Verifying  : 2:texlive-xecjk-svn28816.3.1.2-45.el7.noarch                                                                                                             1/1

Installed:
  texlive-xecjk.noarch 2:svn28816.3.1.2-45.el7

Complete!

Leave a Reply