Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- T T の投稿
返信数: 11
Manjaro Linux 18.02 ではコンパイル出来ていたファイルを、19.02 にしたシステムでコンパイルしようとしたら、以下のようなメッセージが出て止まってしまいました。

[TT]$ platex (ファイル名)
This is e-pTeX, Version 3.14159265-p3.8.2-190131-2.6 (utf8.euc) (TeX Live 2019/Arch Linux) (preloaded format=platex)
restricted \write18 enabled.

kpathsea: Running mktexfmt platex.fmt
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "",
LC_ALL = (unset),
LC_ADDRESS = "ja_JP.UTF-8",
LC_NAME = "ja_JP.UTF-8",
LC_MONETARY = "ja_JP.UTF-8",
LC_PAPER = "ja_JP.UTF-8",
LC_IDENTIFICATION = "ja_JP.UTF-8",
LC_TELEPHONE = "ja_JP.UTF-8",
LC_MEASUREMENT = "ja_JP.UTF-8",
LC_TIME = "en_GB.UTF-8",
LC_NUMERIC = "ja_JP.UTF-8",
LANG = "ja_JP.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("ja_JP.UTF-8").
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt: /etc/texmf/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt: /home/(アカウント名)/.texlive/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /home/(アカウント名)/.texlive/texmf-var/web2c
mktexfmt [INFO]: did not find entry for byfmt=platex, skipped
mktexfmt [INFO]: Disabled formats: 6
mktexfmt [INFO]: Not selected formats: 28
mktexfmt [INFO]: Total formats: 34
mktexfmt [INFO]: exiting with status 0
I can't find the format file `platex.fmt'!

ネットの情報で、闇雲に

sudo fmtutil-sys --all


sudo mktexlsr

などを繰り返してみましたが、状況は変わりません。

お知恵拝借できれば幸いです。
T T への返信

Re: Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- 和田 勇 の投稿
使ったことがない Arch 系のディストリビューションで検証できる環境がないので「ロケール関係」の情報です。

> Xlanguage= "",
> LC_ALL = (unset),
> ...snip...
>LANG = "ja_JP.UTF-8"
>are supported and installed on your system.
>perl: warning: Falling back to a fallback locale ("ja_JP.UTF-8").

https://qiita.com/wanghaidong1972/items/13cf0740a13c9ee1b279
とかはご覧になられたでしょうか?
このページでは「/etc/environment」で対処されているようですが、ロケール関係のシステム設定は以下のようなコマンドで確かめられます。

   grep -r LANG /etc/ 2>/dev/null


# TeXLive をネットインストールして /usr/local/texlive/20xx/ だとどうなるのだろうか
和田 勇 への返信

Re: Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- 和田 勇 の投稿
Manjaro で試して見ました

■Manjaro インストール
manjaro-gnome-19.0.2-minimal-200311-linux54.iso
をダウンロードして Virtualbox にインストール。

今回のこともあり言語を 日本語 を意図的に選んだ以外は特段の設定なし。

■ TeXLive インストール

pacman を使ってインストールされた形跡が見られたので以下のページを参考にTeXLive インストールして見ました
https://qiita.com/Aruneko/items/6d073447bff91addd512


■ platex / updates のテスト

LaTeX は一番上の参考にしたページの例題を用いてplatex / uplatex を実行しましたが mktexmf も走ることなくまた特にエラーもなく終了

■ platex.fmt はどこ?

私の環境では
  /usr/local/texlive/2019/texmf-var/web2c/eptex/platex.fmt
にあるので類似の所
 find /usr/share/texmf-dist/web2c /etc/texmf/ -iname '*fmt'
を探して見ましたが platex.fmt はないですね。

Arch のパッケージングで外されているのかな?
お試しになった原稿見せていただけませんか?

■ ロケールの話ですが以下の設定はおそらくインストールの時の反映だと思いますがこれどうなっていますか?

1) /etc/locale.conf ← sudo localectl set-locale ja_JP.utf8 で設定変更可
  1:LANG=ja_JP.UTF-8

2) /etc/default/locale ← arch 系でコマンドで直す方法は??なので手で修正しても可。
  1:LANG=ja_JP.UTF-8

和田 勇 への返信

Re: Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- T T の投稿
こちらのお返事を拝見して、とりあえず現在インストールされていた texlive 関係を remove し(texlive-bin, -core, -extra, -latexextra の三つでした;これらは Manjaro の GUI, pamac で install 及び remove しました)、改めて端末で

sudo pacman -S texlive-langjapanese texlive-most ghostscript evince poppler-data

をすると、

:: There are 12 members in group texlive-most:
:: Repository extra
1) texlive-bibtexextra 2) texlive-core 3) texlive-fontsextra
4) texlive-formatsextra 5) texlive-games 6) texlive-humanities
7) texlive-latexextra 8) texlive-music 9) texlive-pictures
10) texlive-pstricks 11) texlive-publishers 12) texlive-science

Enter a selection (default=all): (デフォルトを選択)
warning: ghostscript-9.52-1 is up to date -- reinstalling
warning: poppler-data-0.4.9-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (20) gnome-desktop-1:3.36.0-1 gspell-1.8.3-1 libgxps-0.3.1-1
texlive-bin-2019.51075-7 evince-3.36.0-1 ghostscript-9.52-1
poppler-data-0.4.9-1 texlive-bibtexextra-2019.52577-1
texlive-core-2019.52579-1 texlive-fontsextra-2019.52580-1
texlive-formatsextra-2019.51280-1 texlive-games-2019.52525-1
texlive-humanities-2019.52574-1
texlive-langjapanese-2019.52531-1
texlive-latexextra-2019.52575-1 texlive-music-2019.52275-1
texlive-pictures-2019.52499-1 texlive-pstricks-2019.52550-1
texlive-publishers-2019.52538-1 texlive-science-2019.52582-1

Total Download Size: 551.61 MiB
Total Installed Size: 2355.83 MiB
Net Upgrade Size: 2295.66 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
texlive-langjapa... 33.5 MiB 2.40 MiB/s 00:14 [###################] 100%
... (ダウンロード経過途中省略)...
poppler-data-0.4... 1477.8 KiB 3.96 MiB/s 00:00 [###################] 100%
(20/20) checking keys in keyring [###################] 100%
(20/20) checking package integrity [###################] 100%
(20/20) loading package files [###################] 100%
(20/20) checking for file conflicts [###################] 100%
(20/20) checking available disk space [###################] 100%
:: Processing package changes...
( 1/20) installing texlive-bin [###################] 100%
Optional dependencies for texlive-bin
ed: for texconfig
biber: for bibliography processing
( 2/20) installing texlive-core [###################] 100%
>>> updmap custom entries should go into /etc/texmf/web2c/updmap-local.cfg
>>> fmtutil custom entries should go into /etc/texmf/web2c/fmtutil-local.cnf
NB: To setup ConTeXt and the lua(la)tex font db,
see http://wiki.archlinux.org/index.php/TeX_Live
Optional dependencies for texlive-core
dialog: for texconfig
ghostscript: for epstopdf, epspdf and other ConTeXt tools [installed]
java-runtime: for utilities like arara
perl-tk: for texdoctk
psutils: to manipulate the output of dvips
python: for pythontex [installed]
python2: for dviasm [installed]
ruby: for old ConTeXT MkII and epspdf [installed]
t1utils: can be useful when installing Type1 fonts
( 3/20) installing texlive-langjapanese [###################] 100%
( 4/20) installing texlive-bibtexextra [###################] 100%
( 5/20) installing texlive-fontsextra [###################] 100%
( 6/20) installing texlive-formatsextra [###################] 100%
( 7/20) installing texlive-games [###################] 100%
( 8/20) installing texlive-latexextra [###################] 100%
Optional dependencies for texlive-latexextra
python2-pygments: for pygmentex
texlive-genericextra: to use the calctab package [installed]
texlive-pictures: to use the package overpic [pending]
java-environment: to use pdfannotextractor
( 9/20) installing texlive-humanities [###################] 100%
Optional dependencies for texlive-humanities
texlive-pictures: for package qtree [pending]
(10/20) installing texlive-music [###################] 100%
Optional dependencies for texlive-music
python2: for scripts from the lilyglyphs packages [installed]
(11/20) installing texlive-pictures [###################] 100%
(12/20) installing texlive-pstricks [###################] 100%
(13/20) installing texlive-publishers [###################] 100%
(14/20) installing texlive-science [###################] 100%
(15/20) reinstalling ghostscript [###################] 100%
(16/20) installing libgxps [###################] 100%
(17/20) installing gnome-desktop [###################] 100%
(18/20) installing gspell [###################] 100%
(19/20) installing evince [###################] 100%
Optional dependencies for evince
texlive-bin: DVI support [installed]
gvfs: bookmark support and session saving [installed]
(20/20) reinstalling poppler-data [###################] 100%
:: Running post-transaction hooks...
(1/8) Arming ConditionNeedsUpdate...
(2/8) Compiling GSettings XML schema files...
(3/8) Updating icon theme caches...
(4/8) Updating TeXLive filename database...
(5/8) Updating the info directory file...
(6/8) Updating TeXLive format files...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "",
LC_ALL = (unset),
LC_ADDRESS = "ja_JP.UTF-8",
LC_NAME = "ja_JP.UTF-8",
LC_MONETARY = "ja_JP.UTF-8",
LC_PAPER = "ja_JP.UTF-8",
LC_IDENTIFICATION = "ja_JP.UTF-8",
LC_TELEPHONE = "ja_JP.UTF-8",
LC_MEASUREMENT = "ja_JP.UTF-8",
LC_TIME = "en_GB.UTF-8",
LC_NUMERIC = "ja_JP.UTF-8",
LANG = "ja_JP.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("ja_JP.UTF-8").
Unable to read environment locale: exit now.
Unable to read environment locale: exit now.
Unable to read environment locale: exit now.
Unable to read environment locale: exit now.
Unable to read environment locale: exit now.
Unable to read environment locale: exit now.
Unable to read environment locale: exit now.
fmtutil [ERROR]: running `luatex -ini -jobname=luatex -progname=luatex luatex.ini </dev/null' return status 1
fmtutil [ERROR]: return error due to options --strict
fmtutil [ERROR]: running `luajittex -ini -jobname=luajittex -progname=luajittex luatex.ini </dev/null' return status 1
fmtutil [ERROR]: return error due to options --strict
fmtutil [ERROR]: running `luatex -ini -jobname=dviluatex -progname=dviluatex dviluatex.ini </dev/null' return status 1
fmtutil [ERROR]: return error due to options --strict
fmtutil [ERROR]: running `luatex -ini -jobname=pdfcsplain -progname=pdfcsplain -etex csplain.ini </dev/null' return status 1
fmtutil [ERROR]: return error due to options --strict
fmtutil [ERROR]: running `luatex -ini -jobname=lualatex -progname=lualatex lualatex.ini </dev/null' return status 1
fmtutil [ERROR]: return error due to options --strict
fmtutil [ERROR]: running `luatex -ini -jobname=dvilualatex -progname=dvilualatex dvilualatex.ini </dev/null' return status 1
fmtutil [ERROR]: return error due to options --strict
fmtutil [ERROR]: running `luatex -ini -jobname=luacsplain -progname=luacsplain -etex csplain.ini </dev/null' return status 1
fmtutil [ERROR]: return error due to options --strict
error: command failed to execute correctly
(7/8) Updating TeXLive font maps...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "",
LC_ALL = (unset),
LC_ADDRESS = "ja_JP.UTF-8",
LC_NAME = "ja_JP.UTF-8",
LC_MONETARY = "ja_JP.UTF-8",
LC_PAPER = "ja_JP.UTF-8",
LC_IDENTIFICATION = "ja_JP.UTF-8",
LC_TELEPHONE = "ja_JP.UTF-8",
LC_MEASUREMENT = "ja_JP.UTF-8",
LC_TIME = "en_GB.UTF-8",
LC_NUMERIC = "ja_JP.UTF-8",
LANG = "ja_JP.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("ja_JP.UTF-8").
(8/8) Updating the desktop file MIME type cache...

と出てインストール完了し、上記ページの例題:

\documentclass[autodetect-engine,dvipdfmx-if-dvi,ja=standard,a4paper,12pt]{bxjsarticle} \begin{document} \section{にほんご} 日本語もOK \end{document} 
を試した所、確かに問題なく動きました。私の元の原稿

\documentclass[12pt,leqno]{article}
\usepackage{color,upref,amsmath,amssymb,amscd}
\usepackage{amsthm}
\usepackage{showkeys}
%
(マクロ定義他省略)
%
\begin{document}
\begin{flushright}
2020 年 4 月\\
モスクワにて\\
武部尚志
\end{flushright}

(以下略)

\end{document}

に試した所、日本語部分が消えましたが latex 自体は動き pdf が生成されました(emacs 上の「やてふ」で C-c t d)。documentclass をサンプルと同じにしたら日本語も表示されました。(テキスト部分の横幅が広くなりすぎましたが、これは別途対策します。)

デフォルトのロケールは、インストール時に日本語にして、お尋ねのファイルは以下のようになりました:

cat /etc/locale.conf
LANG=ja_JP.UTF-8
LC_ADDRESS=ja_JP.UTF-8
LC_IDENTIFICATION=ja_JP.UTF-8
LC_MEASUREMENT=ja_JP.UTF-8
LC_MONETARY=ja_JP.UTF-8
LC_NAME=ja_JP.UTF-8
LC_NUMERIC=ja_JP.UTF-8
LC_PAPER=ja_JP.UTF-8
LC_TELEPHONE=ja_JP.UTF-8
LC_TIME=ja_JP.UTF-8

cat /etc/default/locale
LANG=ja_JP.UTF-8
LC_ADDRESS=ja_JP.UTF-8
LC_IDENTIFICATION=ja_JP.UTF-8
LC_MEASUREMENT=ja_JP.UTF-8
LC_MONETARY=ja_JP.UTF-8
LC_NAME=ja_JP.UTF-8
LC_NUMERIC=ja_JP.UTF-8
LC_PAPER=ja_JP.UTF-8
LC_TELEPHONE=ja_JP.UTF-8
LC_TIME=ja_JP.UTF-8

気が付きましたが、最初にインストールする時は、

・"xornal++" のインストール時に依存関係で texlive 関係を要求され、
・その後で TeX 関係を入れようとした時に "texlive" を pamac で検索したところ、texlive-bin, texlive-core, texlive-latexextra が入っていた。

という状況で安心してしまい、他に何も入れなかったのが問題なのかもしれません。特に texlive-langjapanese には気づいていませんでした。

今、texlive-langjapanese を remove して、再度最初に問題を起こしたファイルをコンパイルした所、フォント関係のエラーが出て止まりましたが、「platex.fmt が無い」というエラーは出ませんでした。最初のエラーはこれが無かったせいではないようです。

とりあえず仕事が出来る環境にはなってホッとしています。和田先生ありがとうございます。
T T への返信

Re: Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- 和田 勇 の投稿
もう解決していたみたいで寝た子を起こしてしまいそうですが

>perl: warning: Please check that your locale settings:
>Xlanguage= "",
>LC_ALL = (unset),
>...snip...
>LANG = "ja_JP.UTF-8"
>are supported and installed on your system.
>perl: warning: Falling back to a fallback locale ("ja_JP.UTF-8").
>Unable to read environment locale: exit now.

は解決されていた方が良いと思いますが。。。
先ほど 18.02 に texlive 2019 を pacman で入れようとすると perl 及び glibc の情報の微妙な違いがあり失敗。そのご 19.02 にアップデートしようにもアップデートが失敗。もし今後上記のメッセージが表示されるようなら、早急に Manjaro19.02 を新規インストールされることを検討されると良いと思います。
和田 勇 への返信

Re: Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- T T の投稿
返事が遅くなり申し訳ありません。

不思議なことに、数日別の仕事でバタバタした後で再度同じ tex source file をコンパイルすると、上記の locale や言語に関するエラーメッセージが全く出なくなっていました。「バタバタ」の間に別のソフトの設定をいじったり、アップデートの警告が出た時に何も考えずにアップデートしたりしていたので、その際に言語関係の設定が変わったのかもしれません。

Manjaro の再インストールは、落ち着いたら考えてみます。18.02 → 19.02 とアップグレードすること自体に何らかの問題があるような気がします(18.02 を使っていて、ソフトウェア・アップデートがうまく行かずにカーネルが死んでしまったのが 19.02 に換えた理由でした)。

有益なアドバイスをありがとうございました。症状が出なくなっただけで確たる原因が分かっていませんから、再発の可能性があります。その際にはまず頂いたアドバイスに沿って調べてみます。
T T への返信

Re: Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- 和田 勇 の投稿
私の方はで18.02 のインストールに手こずったのも、レポートにある症状に似ていますね。一旦はインストールできたもののOSのアップデート中、気がついたらスリープ解除のパスワード入力できないとか、仕方なくリブートしたらカーネル?がないとか、perl がやっぱり動かなくなったり ... と四苦八苦。最後は確かOS インストールした直後になんとか texlive だけ入れるのがやっと。

(VirtualBox 側の設定もあれこれ調整。ビデオ用メモリ 16M->128M とかメモリも 1G から 16G それに合わせてストレージもスワップ領域分を増やすなども行わないダメでした。

うまく動くようになったとのこと、何よりですが。。。
事前に現状のバックアップを rsync などで別ストレージにしておく必要はありますが、せいぜい二・三時間程度ですので 19.02 をスクラッチから新規インストールされる方が良いかと思います。

和田 勇 への返信

Re: Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- T T の投稿
御返事ありがとうございます。お教え頂いたページを参考に

locale -a

としてみると、

C
POSIX
en_US.utf8
ja_JP.utf8

また、

grep -r LANG /etc/ 2>/dev/null

では

/etc/mail.rc:# $LC_ALL / $LANG environment variables and react upon them).
/etc/default/locale:LANG=ja_JP.UTF-8
/etc/locale.conf:LANG=ja_JP.UTF-8
/etc/profile.d/locale.sh:if [ -z "$LANG" ]; then
/etc/profile.d/locale.sh:# define default LANG to C if not already defined
/etc/profile.d/locale.sh:LANG=${LANG:-C}
/etc/profile.d/locale.sh:export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \
/etc/grub.d/00_header:grub_lang=`echo $LANG | cut -d . -f 1`
/etc/grub.d/00_header:if [ "x${LANG}" != "xC" ] && [ "x${LANG}" != "x" ]; then

と出ました。
T T への返信

Re: Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- 和田 勇 の投稿
/etc/default/locale /etc/locale.conf  の内容を見ると
システムの言語の設定は問題なさそうですね。

個人環境かな?ターミナルで以下のコマンド
  locale
で LANG= が ja_JP.utf8 以外になっているならホームディレクトリの .bashrc とか .zshrc とかチェックする必要があり。

#現在 platex.fmt がどこにあるか調査しようと 18.0.2 をダウンロード中
和田 勇 への返信

Re: Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- T T の投稿
早速の返事ありがとうございます。locale は

locale
locale: Cannot set LC_ALL to default locale: そのようなファイルやディレクトリはありません
LANG=ja_JP.UTF-8
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC=ja_JP.UTF-8
LC_TIME=en_GB.UTF-8
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY=ja_JP.UTF-8
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER=ja_JP.UTF-8
LC_NAME=ja_JP.UTF-8
LC_ADDRESS=ja_JP.UTF-8
LC_TELEPHONE=ja_JP.UTF-8
LC_MEASUREMENT=ja_JP.UTF-8
LC_IDENTIFICATION=ja_JP.UTF-8
LC_ALL=

と出ました。LANG=ja_JP.UTF-8 なので関係ないかもしれませんが、.bashrc はデフォルトで出来ていたものに、日本語入力用に

export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export QT_IM_MODULE=fcitx

を付けたものです。
T T への返信

Re: Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- 和田 勇 の投稿
19.02 はすんなりなのに、18.02 のインストール数回実施。何故か思い通りにいかないので諦め。 :-(

時間ばかり経過するだけなので提案。もう一度
Manjaro 19.02 をインストールししてはいかがでしょうか?

とはいえ、再インストールは NG と言うのであれば、調べることはいくつかあります。例えば
▼ 環境変数 PATH の値がどうなっているか
▼何故 LC_TIME=en_GB.UTF-8 となってるのか
▼「locale: Cannot set LC_ALL to default locale: ‥」と表示されれているけど /etc/locale.conf で LANG=ja_JP.UTF-8 がコメントアウトされていないか
▼texlive さインストールされた際にも perl のエラーが出てるけど perl はカスタムなもの入れていないのかな which -a perl でわかる
▼perl の環境を cpan などからインストールしたもので補完してる?
▼環境変数 PERL5LIB とか定義してます?

テスト用の以下の原稿でも同じですよね

\documentclass[autodetect-engine,dvipdfmx-if-dvi,ja=standard,a4paper,12pt]{bxjsarticle}

\begin{document}
\section{にほんご}
日本語もOK
\end{document}
T T への返信

Re: Manjaro Linux を 18.02 から 19.02 にしたら format file `platex.fmt' が無いと言われました。

- 和田 勇 の投稿
19.02 はすんなりなのに、18.02 のインストール数回実施。何故か思い通りにいかないので諦め。 :-(

時間ばかり経過するだけなので提案。もう一度
Manjaro 19.02 をインストールししてはいかがでしょうか?

とはいえ、再インストールは NG と言うのであれば、調べることはいくつかあります。例えば
▼ 環境変数 PATH の値がどうなっているか
▼何故 LC_TIME=en_GB.UTF-8 となってるのか
▼「locale: Cannot set LC_ALL to default locale: ‥」と表示されれているけど /etc/locale.conf で LANG=ja_JP.UTF-8 がコメントアウトされていないか
▼texlive さインストールされた際にも perl のエラーが出てるけど perl はカスタムなもの入れていないのかな which -a perl でわかる
▼perl の環境を cpan などからインストールしたもので補完してる?
▼環境変数 PERL5LIB とか定義してます?

テスト用の以下の原稿でも同じですよね

\documentclass[autodetect-engine,dvipdfmx-if-dvi,ja=standard,a4paper,12pt]{bxjsarticle}

\begin{document}
\section{にほんご}
日本語もOK
\end{document}