0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[LaTeX][Manjaro Linux]latexindentコマンドが動かないときの対処法

Posted at

依存モジュールがインストールされていないためlatexindentが動かない

Manjaro LinuxにTeX Liveを入れ、LaTeX文書を書いています。
TeX Liveをインストールすると、LaTeXのフォーマッターであるlatexindentコマンドも同時にインストールされます。
しかし、次のようなエラーが出てそのままでは動かない場合があります。

Can't locate YAML/Tiny.pm in @INC (you may need to install the YAML::Tiny module) (@INC contains: /usr/local/texlive/2021/texmf-dist/scripts/latexindent /usr/lib/perl5/5.34/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.34/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.34/core_perl /usr/share/perl5/core_perl) at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm line 21.
BEGIN failed--compilation aborted at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm line 21.
Compilation failed in require at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/Verbatim.pm line 22.
BEGIN failed--compilation aborted at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/Verbatim.pm line 22.
Compilation failed in require at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/Lines.pm line 22.
BEGIN failed--compilation aborted at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/Lines.pm line 22.
Compilation failed in require at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/Document.pm line 28.
BEGIN failed--compilation aborted at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/Document.pm line 28.
Compilation failed in require at /usr/local/texlive/2021/bin/x86_64-linux/latexindent line 27.
BEGIN failed--compilation aborted at /usr/local/texlive/2021/bin/x86_64-linux/latexindent line 27.

pacmanを使って依存モジュールを一つひとつインストールする

以前、Fedoraでも同じような状況に陥って似たような記事を書きましたが、要はエラーで言われている足りていないモジュールをインストールしてやれば動くと思います。

私の環境ではYAML::TinyFile::HomeDirUnicode::GCStringが足らなかったので次のようにしました。

sudo pacman -S perl-yaml-tiny perl-file-homedir perl-unicode-linebreak
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?