无法在 Ubuntu 20.04.2 LTS 上配置 tex-common

无法在 Ubuntu 20.04.2 LTS 上配置 tex-common

我的软件更新程序出现问题已有一段时间了,出于某种原因,它生成一条错误消息,指出问题来自 tex-common。我无法重现此错误,因为我设法修复了它,我通过删除 tex-common 并成功运行软件更新程序修复了它。但是当我尝试重新安装我的 latex 环境时,我遇到了问题。当我运行:sudo apt-get install 'texlive-*' 安装过程开始正常,但最后我得到:

Running updmap-sys. This may take some time... done.
Running mktexlsr /var/lib/texmf ... done.
Building format(s) --all.
    This may take some time... 
fmtutil failed. Output has been stored in
/tmp/fmtutil.2mboIsZN
Please include this file if you report a bug.

dpkg: error processing package tex-common (--configure):
 installed tex-common package post-installation script subprocess returned error exit status 1
Processing triggers for install-info (6.7.0.dfsg.2-5) ...
Processing triggers for fontconfig (2.13.1-2ubuntu3) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Errors were encountered while processing:
 tex-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试过sudo dpkg -C,我得到:

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 tex-common           common infrastructure for building and installing TeX

该命令sudo dpkg --configure tex-common失败,并显示与第一个命令类似的消息:

Setting up tex-common (6.13) ...
Running mktexlsr. This may take some time... done.
Running mtxrun --generate. This may take some time... done.
Running updmap-sys. This may take some time... done.
Running mktexlsr /var/lib/texmf ... done.
Building format(s) --all.
    This may take some time... 
fmtutil failed. Output has been stored in
/tmp/fmtutil.il5mWMsU
Please include this file if you report a bug.

dpkg: error processing package tex-common (--configure):
 installed tex-common package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 tex-common

我尝试过sudo apt-get install --reinstall tex-common,我收到一条以以下内容结尾的消息:

0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for tex-common:amd64

两个月前我在这个论坛上发现了一个非常类似的问题(20.04.2 升级期间 tex-common 更新不完整),但问题已通过以下方式修复:“安装 texlive-formats-extra(以及由此触发的许多其他软件包)似乎已解决问题。谢谢,”现在这对我不起作用,当我尝试安装 texlive-formats-extra 时,我收到了与 相同的错误消息fmtutil failed.

该命令apt-cache policy tex-common输出:

tex-common:
  Installed: 6.13
  Candidate: 6.13
  Version table:
 *** 6.13 500
        500 http://fr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://fr.archive.ubuntu.com/ubuntu focal/universe i386 Packages
        100 /var/lib/dpkg/status

/tmp/fmtutil.il5mWMsU文件长 15500 行,最后几行是:

  148 for language 4
  54 for language 3
  2 for language 1
  181 for language 0
No pages of output.
Transcript written on uplatex-dev.log.
fmtutil [INFO]: log file copied to: /var/lib/texmf/web2c/euptex/uplatex-dev.log
fmtutil [INFO]: /var/lib/texmf/web2c/euptex/uplatex-dev.fmt installed.
fmtutil [ERROR]: running `pdftex -ini   -jobname=pdfjadetex -progname=pdfjadetex *pdfjadetex.ini </dev/null' return status: 1
fmtutil [ERROR]: returning error due to option --strict
fmtutil [ERROR]: running `pdftex -ini   -jobname=jadetex -progname=jadetex *jadetex.ini </dev/null' return status: 1
fmtutil [ERROR]: returning error due to option --strict
fmtutil [INFO]: disabled formats: 1
fmtutil [INFO]: successfully rebuilt formats: 50
fmtutil [INFO]: failed to build: 2 (pdftex/pdfjadetex pdftex/jadetex)
fmtutil [INFO]: total formats: 53
fmtutil [INFO]: exiting with status 2

命令which pdftex返回/usr/bin/pdftex。 命令pdftex --version返回:

pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian)
kpathsea version 6.3.1
Copyright 2019 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.01

命令which jadetex; which pdfjadetex; jadetex --version; pdfjadetex --version; dpkg -S jadetex.ini; sudo find / -type f -name "*jadetex.ini"返回:

/usr/bin/jadetex
/usr/bin/pdfjadetex
pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian)
kpathsea version 6.3.1
Copyright 2019 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.01
pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian)
kpathsea version 6.3.1
Copyright 2019 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.01
texlive-formats-extra: /usr/share/texlive/texmf-dist/tex/jadetex/base/pdfjadetex.ini
texlive-formats-extra: /usr/share/texlive/texmf-dist/tex/jadetex/base/jadetex.ini
[sudo] password for XXXXXX: 
/usr/share/texlive/texmf-dist/tex/jadetex/base/pdfjadetex.ini
/usr/share/texlive/texmf-dist/tex/jadetex/base/jadetex.ini
find: ‘/run/user/1000/doc’: Permission denied
find: ‘/run/user/1000/gvfs’: Permission denied

我没有手动更改 ini 文件。我不知道它们是什么,我可能无意中更改了它们吗?

答案1

它解决了我通过设置LC_ALL和重新配置locale

所以:

export LC_ALL="en_US.UTF-8"
sudo dpkg-reconfigure locales

答案2

tex-common由于语言环境问题,我在通过更新apt时也遇到了问题。我发现在桌面环境之外的 tty 中执行此操作有效,而在桌面环境 (KDE Plasma、Ubuntu LTS 22.04) 中的终端内执行此操作则不行,这让我相信桌面环境中设置的语言环境混淆了更新过程。

相关内容