尝试安装 texlive 时出现 tex-common 错误——Ubuntu 20.04 LTS

尝试安装 texlive 时出现 tex-common 错误——Ubuntu 20.04 LTS

我正在尝试安装texlive

在新机器上成功安装 Ubuntu 20.04 后,我“清除”了 texlive,结果出现了无法编译其他系统上可以轻松运行的任何 *.tex 文件的情况。因此,我决定清除该安装,然后再试一次。

我把“清除”放在引号中,因为在尝试从我的系统中清除后texlive(通过执行在接受的答案中给出的步骤这篇 Tex Stack Exchange 帖子),看来这个过程实际上并没有texlive像我预期的那样删除所有与 相关的内容。

尽管如此,我还是尝试texlive再次安装,现在陷入了一个无望的循环,无论我使用什么命令 -sudo apt-get install 'texlive-*'或者sudo apt install texlive-full任何更长,更复杂的命令 - 我都会收到一个总是涉及的错误tex-common

fmtutil failed. Output has been stored in /tmp/fmtutil.L7mCqGpc 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 E:
Sub-process /usr/bin/dpkg returned an error code (1)

每次尝试失败后,我都会按照相同的步骤“清除” texlive,以便从我的系统中删除我希望的所有失败尝试的痕迹。

我注意到,在完成texlive从系统中删除这八个步骤后,仍然有与相关的文件剩余tex-common。因此,当我尝试执行此操作sudo apt-get purge tex-common时,locate tex-common会出现十六个文件/文件夹。

我该如何解决这个问题才能成功安装texlive


N0rbert,感谢您的回复。PPA……我想我没用过。抱歉,记不清了,我的其他机器从来没有出现过问题。我想我只是用过sudo apt install texlive-full或类似的东西。我可能使用 Ubuntu 软件中心安装了 TexWorks……使用我上面提到的分步方法将其擦除。

输出grep -r "^deb " /etc/apt/ --include="*.list"

/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
/etc/apt/sources.list.d/teams.list:deb [arch=amd64] https://packages.microsoft.com/repos/ms-teams stable main
/etc/apt/sources.list.d/miktex.list:deb http://miktex.org/download/ubuntu bionic universe
/etc/apt/sources.list.d/system76-dev-ubuntu-stable-focal.list:deb http://ppa.launchpad.net/system76-dev/stable/ubuntu focal main
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

输出apt-cache policy texlive-full

texlive-full:
  Installed: 2019.20200218-1
  Candidate: 2019.20200218-1
  Version table:
 *** 2019.20200218-1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

输出sudo apt-get dist upgrade

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  fwupd fwupd-signed google-chrome-stable libegl-mesa0 libegl1-mesa libfwupd2 libfwupdplugin1 libgbm1 libgl1-mesa-dri
  libgl1-mesa-glx libglapi-mesa libglx-mesa0 libmysqlclient21 libnetplan0 libnss-systemd libpam-systemd libsystemd0 libudev1
  libxatracker2 linux-firmware mesa-vulkan-drivers netplan.io python3-update-manager system76-driver system76-power systemd
  systemd-sysv systemd-timesyncd udev update-manager update-manager-core
31 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 143 kB/312 MB of archives.
After this operation, 5,979 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/system76-dev/stable/ubuntu focal/main amd64 libegl-mesa0 amd64 21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev [143 kB]
Fetched 135 kB in 1s (240 kB/s)       
Extracting templates from packages: 100%
(Reading database ... 475587 files and directories currently installed.)
Preparing to unpack .../libnss-systemd_245.4-4ubuntu3.13_amd64.deb ...
Unpacking libnss-systemd:amd64 (245.4-4ubuntu3.13) over (245.4-4ubuntu3.11) ...
Preparing to unpack .../udev_245.4-4ubuntu3.13_amd64.deb ...
Unpacking udev (245.4-4ubuntu3.13) over (245.4-4ubuntu3.11) ...
Preparing to unpack .../libudev1_245.4-4ubuntu3.13_amd64.deb ...
Unpacking libudev1:amd64 (245.4-4ubuntu3.13) over (245.4-4ubuntu3.11) ...
Setting up libudev1:amd64 (245.4-4ubuntu3.13) ...
(Reading database ... 475588 files and directories currently installed.)
Preparing to unpack .../systemd-sysv_245.4-4ubuntu3.13_amd64.deb ...
Unpacking systemd-sysv (245.4-4ubuntu3.13) over (245.4-4ubuntu3.11) ...
Preparing to unpack .../systemd-timesyncd_245.4-4ubuntu3.13_amd64.deb ...
Unpacking systemd-timesyncd (245.4-4ubuntu3.13) over (245.4-4ubuntu3.11) ...
Preparing to unpack .../libpam-systemd_245.4-4ubuntu3.13_amd64.deb ...
Unpacking libpam-systemd:amd64 (245.4-4ubuntu3.13) over (245.4-4ubuntu3.11) ...
Preparing to unpack .../systemd_245.4-4ubuntu3.13_amd64.deb ...
Unpacking systemd (245.4-4ubuntu3.13) over (245.4-4ubuntu3.11) ...
Preparing to unpack .../libsystemd0_245.4-4ubuntu3.13_amd64.deb ...
Unpacking libsystemd0:amd64 (245.4-4ubuntu3.13) over (245.4-4ubuntu3.11) ...
Setting up libsystemd0:amd64 (245.4-4ubuntu3.13) ...
(Reading database ... 475588 files and directories currently installed.)
Preparing to unpack .../00-libgl1-mesa-dri_21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev_amd64.deb ...
Unpacking libgl1-mesa-dri:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) over (21.2.1-2ubuntu1pop0~1631200248~20.04~4d5cd49~dev) ...
Preparing to unpack .../01-libglx-mesa0_21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev_amd64.deb ...
Unpacking libglx-mesa0:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) over (21.2.1-2ubuntu1pop0~1631200248~20.04~4d5cd49~dev) ...
Preparing to unpack .../02-libegl-mesa0_21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev_amd64.deb ...
Unpacking libegl-mesa0:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) over (21.2.1-2ubuntu1pop0~1631200248~20.04~4d5cd49~dev) ...
Preparing to unpack .../03-libglapi-mesa_21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev_amd64.deb ...
Unpacking libglapi-mesa:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) over (21.2.1-2ubuntu1pop0~1631200248~20.04~4d5cd49~dev) ...
Preparing to unpack .../04-libgbm1_21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev_amd64.deb ...
Unpacking libgbm1:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) over (21.2.1-2ubuntu1pop0~1631200248~20.04~4d5cd49~dev) ...
Preparing to unpack .../05-google-chrome-stable_94.0.4606.71-1_amd64.deb ...
Unpacking google-chrome-stable (94.0.4606.71-1) over (94.0.4606.54-1) ...
Preparing to unpack .../06-libnetplan0_0.103-0ubuntu5~20.04.1_amd64.deb ...
Unpacking libnetplan0:amd64 (0.103-0ubuntu5~20.04.1) over (0.102-0ubuntu1~20.04.2) ...
Preparing to unpack .../07-netplan.io_0.103-0ubuntu5~20.04.1_amd64.deb ...
Unpacking netplan.io (0.103-0ubuntu5~20.04.1) over (0.102-0ubuntu1~20.04.2) ...
Preparing to unpack .../08-python3-update-manager_1%3a20.04.10.9_all.deb ...
Unpacking python3-update-manager (1:20.04.10.9) over (1:20.04.10.7) ...
Preparing to unpack .../09-update-manager-core_1%3a20.04.10.9_all.deb ...
Unpacking update-manager-core (1:20.04.10.9) over (1:20.04.10.7) ...
Preparing to unpack .../10-update-manager_1%3a20.04.10.9_all.deb ...
Unpacking update-manager (1:20.04.10.9) over (1:20.04.10.7) ...
Preparing to unpack .../11-fwupd-signed_1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev_amd64.deb ...
Unpacking fwupd-signed (1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev) over (1.5.11-0ubuntu2pop1~1627329462~20.04~3e64f3f~dev) ...
Preparing to unpack .../12-libfwupd2_1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev_amd64.deb ...
Unpacking libfwupd2:amd64 (1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev) over (1.5.11-0ubuntu2pop1~1627329462~20.04~3e64f3f~dev) ...
Preparing to unpack .../13-libfwupdplugin1_1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev_amd64.deb ...
Unpacking libfwupdplugin1:amd64 (1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev) over (1.5.11-0ubuntu2pop1~1627329462~20.04~3e64f3f~dev) ...
Preparing to unpack .../14-fwupd_1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev_amd64.deb ...
Unpacking fwupd (1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev) over (1.5.11-0ubuntu2pop1~1627329462~20.04~3e64f3f~dev) ...
Preparing to unpack .../15-libegl1-mesa_21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev_amd64.deb ...
Unpacking libegl1-mesa:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) over (21.2.1-2ubuntu1pop0~1631200248~20.04~4d5cd49~dev) ...
Preparing to unpack .../16-libgl1-mesa-glx_21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev_amd64.deb ...
Unpacking libgl1-mesa-glx:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) over (21.2.1-2ubuntu1pop0~1631200248~20.04~4d5cd49~dev) ...
Preparing to unpack .../17-libmysqlclient21_8.0.26-0ubuntu0.20.04.3_amd64.deb ...
Unpacking libmysqlclient21:amd64 (8.0.26-0ubuntu0.20.04.3) over (8.0.26-0ubuntu0.20.04.2) ...
Preparing to unpack .../18-libxatracker2_21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev_amd64.deb ...
Unpacking libxatracker2:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) over (21.2.1-2ubuntu1pop0~1631200248~20.04~4d5cd49~dev) ...
Preparing to unpack .../19-linux-firmware_1.200+system76~1632347857~20.04~9a6d09b~dev_all.deb ...
Unpacking linux-firmware (1.200+system76~1632347857~20.04~9a6d09b~dev) over (1.199+system76~1627913034~20.04~a184ea1~dev) ...
Preparing to unpack .../20-mesa-vulkan-drivers_21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev_amd64.deb ...
Unpacking mesa-vulkan-drivers:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) over (21.2.1-2ubuntu1pop0~1631200248~20.04~4d5cd49~dev) ...
Preparing to unpack .../21-system76-power_1.1.18~1632516399~20.04~0bf0fc7~dev_amd64.deb ...
Unpacking system76-power (1.1.18~1632516399~20.04~0bf0fc7~dev) over (1.1.18~1632252487~20.04~4f636eb~dev) ...
Preparing to unpack .../22-system76-driver_20.04.43~1632933380~20.04~0ac2ed2~dev_all.deb ...
Unpacking system76-driver (20.04.43~1632933380~20.04~0ac2ed2~dev) over (20.04.42~1631829434~20.04~fd049c1~dev) ...
Setting up mesa-vulkan-drivers:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) ...
Setting up libmysqlclient21:amd64 (8.0.26-0ubuntu0.20.04.3) ...
Setting up libgbm1:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) ...
Setting up linux-firmware (1.200+system76~1632347857~20.04~9a6d09b~dev) ...
update-initramfs: Generating /boot/initrd.img-5.13.0-7614-generic
update-initramfs: Generating /boot/initrd.img-5.11.0-7633-generic
update-initramfs: Generating /boot/initrd.img-5.11.0-37-generic
Setting up libfwupd2:amd64 (1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev) ...
Setting up libnetplan0:amd64 (0.103-0ubuntu5~20.04.1) ...
Setting up libxatracker2:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) ...
Setting up libegl1-mesa:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) ...
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.VSeGny8X
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
Setting up udev (245.4-4ubuntu3.13) ...
update-initramfs: deferring update (trigger activated)
Setting up libfwupdplugin1:amd64 (1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev) ...
Setting up libglapi-mesa:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) ...
Setting up python3-update-manager (1:20.04.10.9) ...
Setting up fwupd (1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev) ...
fwupd-offline-update.service is a disabled or a static unit not running, not starting it.
fwupd-refresh.service is a disabled or a static unit not running, not starting it.
Setting up google-chrome-stable (94.0.4606.71-1) ...
Setting up libgl1-mesa-dri:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) ...
Setting up fwupd-signed (1.5.11-0ubuntu2pop1.1~1632510283~20.04~5dec90e~dev) ...
Setting up libegl-mesa0:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) ...
Setting up update-manager-core (1:20.04.10.9) ...
Setting up libglx-mesa0:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) ...
Setting up update-manager (1:20.04.10.9) ...
Setting up libgl1-mesa-glx:amd64 (21.2.1-2ubuntu2pop0~1632348269~20.04~616afda~dev) ...
Setting up systemd (245.4-4ubuntu3.13) ...
Installing new version of config file /etc/dhcp/dhclient-enter-hooks.d/resolved ...
Setting up netplan.io (0.103-0ubuntu5~20.04.1) ...
Setting up systemd-timesyncd (245.4-4ubuntu3.13) ...
Setting up system76-power (1.1.18~1632516399~20.04~0bf0fc7~dev) ...
Setting up systemd-sysv (245.4-4ubuntu3.13) ...
Setting up libnss-systemd:amd64 (245.4-4ubuntu3.13) ...
Setting up libpam-systemd:amd64 (245.4-4ubuntu3.13) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.13.0-7614-generic
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.64.6-1~ubuntu20.04.4) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.1) ...
Setting up system76-driver (20.04.43~1632933380~20.04~0ac2ed2~dev) ...
INFO    product_version: 'meer6'
INFO    displayport1_force_enable_audio: Force enable audio output from DP-1 (physical HDMI 1 port.)
INFO    Skipping 'displayport1_force_enable_audio' as it was already applied
Errors were encountered while processing:
 tex-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

输出apt-cache policy miktex

miktex:
  Installed: (none)
  Candidate: 21.6-bionic1
  Version table:
     21.6-bionic1 500
        500 http://miktex.org/download/ubuntu bionic/universe amd64 Packages
     21.3-bionic1 500
        500 http://miktex.org/download/ubuntu bionic/universe amd64 Packages
     21.1-bionic1 500
        500 http://miktex.org/download/ubuntu bionic/universe amd64 Packages
     20.12-bionic1 500
        500 http://miktex.org/download/ubuntu bionic/universe amd64 Packages
     20.11-bionic1 500
        500 http://miktex.org/download/ubuntu bionic/universe amd64 Packages
     20.10-bionic1 500
        500 http://miktex.org/download/ubuntu bionic/universe amd64 Packages
     20.6.29-bionic1 500
        500 http://miktex.org/download/ubuntu bionic/universe amd64 Packages
     20.6-bionic1 500
        500 http://miktex.org/download/ubuntu bionic/universe amd64 Packages

输出sudo apt-get install tree

Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  tree
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 43.0 kB of archives.
After this operation, 115 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 tree amd64 1.8.0-1 [43.0 kB]
Fetched 43.0 kB in 0s (88.5 kB/s)
Selecting previously unselected package tree.
(Reading database ... 475613 files and directories currently installed.)
Preparing to unpack .../tree_1.8.0-1_amd64.deb ...
Unpacking tree (1.8.0-1) ...
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.1bdpEBPj
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
Setting up tree (1.8.0-1) ...
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
 tex-common
E: Sub-process /usr/bin/dpkg returned an error code (1)`

输出tree /usr/local/bin

/usr/local/bin

0 directories, 0 files

N0rbert,感谢您的快速回复。这个/tmp/fmtutil.VSeGny8X文件非常大,超过 14,000 行。有办法上传吗?

是的,运行 System76 meerkat 硬件。

which miktexsetup不返回任何内容。

输出dpkg -l

抱歉,但我该如何上传包含输出的文件?这又是一个大问题

答案1

总结不要使用/混合 MikTex 与 deb 打包的 TeXLive。不要使用/混合二进制 TeXLive 与 deb 打包的 TeXLive。请仅使用 deb 打包的 TeXLive 来避免出现问题。

细节。系统有活动的 MikTex 存储库。为防止与 TexLive 发生冲突,请使用以下命令禁用它:

miktexsetup cleanup
sudo miktexsetup --shared=yes cleanup

sudo apt autoremove --purge miktex
sudo rm -v /etc/apt/sources.list.d/miktex.list
sudo rm -v /etc/fonts/conf.d/09-miktex.conf
sudo apt-get update

然后只使用 TexLive。

在聊天过程中,我们发现系统本地安装了 Texlive。我们按照以下步骤操作:

  1. 删除所有与 TeX 相关的包

    sudo apt autopurge $(dpkg -l | grep "TeX" | grep ^ii | awk '{print $2}')
    

    有趣的是 - 删除过程有几行,例如dpkg: warning: while removing texlive-latex-extra, directory '/usr/share/texlive/texmf-dist/tex/latex/stex/statements' not empty so not removed。所以我们对它们进行分类,并使用以下命令删除:

    sudo rm -rfv /usr/share/fonts/truetype/artemisia
    sudo rm -rfv /usr/share/fonts/truetype/baskerville
    sudo rm -rfv /usr/share/fonts/truetype/bodoni-classic
    sudo rm -rfv /usr/share/fonts/truetype/didot
    sudo rm -rfv /usr/share/fonts/truetype/didot-classic
    sudo rm -rfv /usr/share/fonts/truetype/gazis
    sudo rm -rfv /usr/share/fonts/truetype/gentium
    sudo rm -rfv /usr/share/fonts/truetype/neohellenic
    sudo rm -rfv /usr/share/fonts/truetype/olga
    sudo rm -rfv /usr/share/fonts/truetype/porson
    sudo rm -rfv /usr/share/fonts/truetype/solomos
    sudo rm -rfv /usr/share/fonts/truetype/theokritos
    sudo rm -rfv /usr/share/fonts/type1/texlive-fonts-recommended
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/achemso
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/acro
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/animate
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/base
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/caption
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/cdpbundl
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/circuitikz
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/dtk
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/endfloat
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/exsheets
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/fancyvrb
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/fontspec
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/glossaries/base
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/graphics
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/hyperref
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/invoice
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/isodoc
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/l3experimental/l3str
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/l3kernel
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/latexconfig
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/lettre
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/makedtx
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/memoir
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/minitoc
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/ms
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/nomencl
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/oberdiek
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/pdfpages
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/pdfx
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/pkgloader
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/polyglossia
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/cmath
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/dcm
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/hwexam
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/metakeys
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/mikoslides
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/modules
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/omdoc
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/omtext
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/presentation
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/problem
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/sproof
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/sref
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/statements
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/stex/workaddress
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/sttools
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/titlesec
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/tkz-base
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/tkz-euclide
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/unicode-math
    sudo rm -rfv /usr/share/texlive/texmf-dist/tex/latex/xdoc
    sudo rm -rfv /usr/share/texmf/fonts/opentype/public/lm
    sudo rm -rfv /usr/share/texmf/fonts/opentype/public/lm-math
    
  2. 然后我们尝试找到特科利使用下面的命令来删除不是来自 deb-packages 的相关文件和文件夹

    sudo find /bin /etc /lib /lib64 /opt /sbin /srv /usr /var -iname "*texlive*" -exec dpkg -S {} \; > /dev/null
    

    并显示以下内容

    dpkg-query: no path found matching pattern /usr/share/texlive
    

    这个文件夹有98 个目录,482 个文件根据tree /usr/share/texlive

    所以我们简单地删除这个文件夹sudo rm -rfv /usr/share/texlive然后继续。

  3. 像往常一样安装所有需要的东西

    sudo apt-get install texlive-base
    sudo apt-get install tex-common
    sudo apt-get install texlive-full
    

相关内容