我在 Debian 上安装了 vanilla TeX Live,但 apt 仍然尝试安装“texlive-”包,尽管我欺骗了包

我在 Debian 上安装了 vanilla TeX Live,但 apt 仍然尝试安装“texlive-”包,尽管我欺骗了包

我已经TeX Live 2022安装并升级到TeX Live 2023。我遵循这本精彩的指南

  1. 删除旧安装
sudo apt-get purge texlive*
sudo rm -rf /usr/local/texlive/*
sudo rm -rf ~/.texlive*
sudo rm -rf /usr/local/share/texmf
sudo rm -rf /var/lib/texmf
sudo rm -rf /etc/texmf
sudo apt-get remove tex-common --purge
find -L /usr/local/bin/ -lname /usr/local/texlive/*/bin/* | xargs -r rm
sudo rm -rf /etc/fonts/conf.d/09-texlive.conf
sudo fc-cache
  1. 依赖项
sudo apt install wget perl-tk
  1. 下载脚本
wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xf install-tl-unx.tar.gz
cd install-tl- #(Press TAB to autocomplete)
  1. 运行脚本
sudo ./install-tl
  1. 设置环境变量
export PATH=/usr/local/texlive/2023/bin/x86_64-linux:$PATH
export MANPATH=$MANPATH:/usr/local/texlive/2023/texmf-dist/doc/man
export INFOPATH=$INFOPATH:/usr/local/texlive/2023/texmf-dist/doc/info
  1. 验证安装
which tex
  1. 技巧包
sudo apt install equivs --no-install-recommends freeglut3
mkdir -p /tmp/tl-equivs && cd /tmp/tl-equivs
equivs-control texlive-local
  1. 编辑 texlive-local
wget -O texlive-local https://tug.org/texlive/files/debian-equivs-2022-ex.txt

在此步骤中我使用了2022 年的示例文件并将年份改为 2023 年。因此它看起来像这样:

Section: misc
Priority: optional
Standards-Version: 4.1.4

Package: texlive-local
Version: 2023.99999999-1
Maintainer: you <[email protected]>
Provides: chktex, biblatex, biblatex-dw, cm-super, cm-super-minimal, context, 
 dvidvi, dvipng, feynmf, fragmaster, jadetex, lacheck, latex-beamer, 
 latex-cjk-all, latex-cjk-chinese, latex-cjk-chinese-arphic-bkai00mp, 
 latex-cjk-chinese-arphic-bsmi00lp, latex-cjk-chinese-arphic-gbsn00lp, 
 latex-cjk-chinese-arphic-gkai00mp, latex-cjk-common, latex-cjk-japanese, 
 latex-cjk-japanese-wadalab, latex-cjk-korean, latex-cjk-thai, latexdiff, 
 latexmk, latex-sanskrit, latex-xcolor, lcdf-typetools, lmodern, luatex, 
 musixtex, passivetex, pgf, preview-latex-style, prosper, ps2eps, psutils, 
 purifyeps, t1utils, tex4ht, tex4ht-common, tex-gyre, texlive, texlive-base, 
 texlive-bibtex-extra, texlive-binaries, texlive-common, texlive-extra-utils,
 texlive-fonts-extra, texlive-fonts-extra-doc, texlive-fonts-recommended,
 texlive-fonts-recommended-doc, texlive-font-utils, texlive-formats-extra,
 texlive-games, texlive-generic-extra, texlive-generic-recommended,
 texlive-humanities, texlive-humanities-doc, texlive-lang-african,
 texlive-lang-all, texlive-lang-arabic, texlive-lang-cjk, texlive-lang-cyrillic,
 texlive-lang-czechslovak, texlive-lang-english, texlive-lang-european,
 texlive-lang-japanese, texlive-lang-chinese, texlive-lang-korean,
 texlive-lang-french, texlive-lang-german, texlive-lang-greek, 
 texlive-lang-indic, texlive-lang-italian, texlive-lang-other, 
 texlive-lang-polish, texlive-lang-portuguese, texlive-lang-spanish,
 texlive-latex-base, texlive-latex-base-doc, texlive-latex-extra, 
 texlive-latex-extra-doc, texlive-latex-recommended, 
 texlive-latex-recommended-doc, texlive-luatex, texlive-math-extra, 
 texlive-metapost, texlive-metapost-doc, texlive-music,
 texlive-omega, texlive-pictures, texlive-pictures-doc, texlive-plain-extra,
 texlive-plain-generic,
 texlive-pstricks, texlive-pstricks-doc, texlive-publishers,
 texlive-publishers-doc, texlive-science, texlive-science-doc, texlive-xetex,
 thailatex, tipa, tipa-doc, xindy, xindy-rules, xmltex, asymptote, texinfo
Depends: freeglut3
Architecture: all
Description: My local installation of TeX Live 2023.
 A full "vanilla" TeX Live 2023
 http://tug.org/texlive/debian#vanilla
  1. 构建并安装包
equivs-build texlive-local
sudo dpkg -i texlive-local_ #(TAB)
sudo apt install -f
  1. 更新 TeXLive
sudo tlmgr update --all
sudo tlmgr --gui

后来我尝试了SageTex一下TexWorks,但编译时出现错误sagetex.sty not found。我以为它是 Tex Live 附带的。我前往我的终端并执行了sudo apt install sagetex。令我惊讶的是,apt 尝试安装texlive-带前缀的软件包。

sudo apt install sagetex

The following NEW packages will be installed:

dvisvgm libptexenc1 libteckit0 libtexlua53 libtexluajit2 lmodern preview-latex-style ps2eps python3-sagetex tex-gyre texlive-base texlive-binaries texlive-font-utils texlive-fonts-recommended texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-pictures texlive-plain-generic tipa

上述文件中明确提到了这些软件包,所以我很困惑为什么 apt 仍在尝试获取它们。忽略这一点并安装SageTeX会破坏我的设置吗?我搞砸了吗,应该重新安装吗TeX Live 2023?在这种情况下,正确的工作方式是什么SageTeX?在 中,使用 编译普通LaTeX文件pdfLaTeX可以正常工作TeXWorks

这是我的SageTex编译脚本TexWorks

#!/bin/sh
pdflatex "${1}.tex"
sage "${1}.sagetex.sage"
pdflatex "${1}.tex"

相关内容