我尝试通过下载 install-tl-unx.tar.gz 文件来安装 TexLive这里并提取它,然后执行 sudo perl install-tl
并将以下内容添加到/etc/profile
:
PATH=/usr/local/texlive/2014/bin/x86_64-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2014/texmf-dist/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2014/texmf-dist/doc/info:$INFOPATH; export INFOPATH
现在,每当我运行类似的测试命令时latex small2e
,它都工作正常。问题是每当我想安装一个程序时,例如
sudo apt-get install wxmaxima
我还想安装它的“建议”和“推荐”软件包,它说它将安装 texlive 及其所有依赖包(tex-common
等)。
我怎样才能让它识别出 TeX 已经安装了?
编辑1:输出apt-cache showpkg texlive-binaries
:
Package: texlive-binaries
Versions:
2013.20130729.30972-2build3 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_main_binary-amd64_Packages)
Description Language:
File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_main_binary-amd64_Packages
MD5: db16fecae335f49155c09b3c343347b1
Description Language: en
File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_main_i18n_Translation-en
MD5: db16fecae335f49155c09b3c343347b1
Reverse Depends:
okular,texlive-binaries
cantor,texlive-binaries
active-documentviewer,texlive-binaries
zlib1g:i386,texlive-binaries 2009-12
texlive-binaries:i386,texlive-binaries
libkpathsea6:i386,texlive-binaries 2013
ptex-jtex,texlive-binaries 2011.20120410-1
xmltex,texlive-binaries
xdvik-ja,texlive-binaries 2011~
texlive-xetex,texlive-binaries 2013.20130512
texlive-science,texlive-binaries 2013.20130512
texlive-omega,texlive-binaries 2013.20130512
texlive-music,texlive-binaries 2013.20130512
texlive-metapost,texlive-binaries 2013.20130512
texlive-lang-polish,texlive-binaries 2013.20130512
texlive-lang-indic,texlive-binaries 2013.20130512
texlive-lang-greek,texlive-binaries 2013.20130512
texlive-lang-czechslovak,texlive-binaries 2013.20130512
texlive-lang-cyrillic,texlive-binaries 2013
texlive-lang-cyrillic,texlive-binaries 2013.20130512
texlive-lang-cjk,texlive-binaries 2013.20130512
texlive-games,texlive-binaries 2013.20130512
texlive-full,texlive-binaries 2013.20130512
texlive-formats-extra,texlive-binaries 2013.20130512
src2tex,texlive-binaries
pybtex,texlive-binaries 2009-5~
okular,texlive-binaries
ocamlweb,texlive-binaries
musixtex,texlive-binaries
multex-base,texlive-binaries
mc,texlive-binaries
liblatex-driver-perl,texlive-binaries
jtex-base,texlive-binaries
jlatex209-base,texlive-binaries
dvipsk-ja,texlive-binaries
cxref-doc,texlive-binaries
cxref,texlive-binaries
context,texlive-binaries
caspar,texlive-binaries
cantor,texlive-binaries
active-documentviewer,texlive-binaries
zlib1g,texlive-binaries 2009-12
texlive-pstricks,texlive-binaries 2013.20130512
texlive-pictures,texlive-binaries 2013.20130512
texlive-math-extra,texlive-binaries 2013.20130512
texlive-luatex,texlive-binaries 2013.20130512
texlive-latex-recommended,texlive-binaries 2013.20130512
texlive-latex-extra,texlive-binaries 2013.20130512
texlive-latex-base,texlive-binaries 2013.20130512
texlive-font-utils,texlive-binaries 2013
texlive-font-utils,texlive-binaries 2013.20130512
texlive-extra-utils,texlive-binaries 2013.20130512
texlive-bibtex-extra,texlive-binaries 2013.20130512
texlive-base,texlive-binaries 2013
texlive-base,texlive-binaries 2013.20130512
texlive-base,texlive-binaries 2013.20130512
libkpathsea6,texlive-binaries 2013
okular,texlive-binaries
cantor,texlive-binaries
active-documentviewer,texlive-binaries
Dependencies:
2013.20130729.30972-2build3 - libc6 (2 2.14) libcairo2 (2 1.12) libfontconfig1 (2 2.9.0) libfreetype6 (2 2.3.9) libgcc1 (2 1:4.1.1) libgraphite2-3 (2 1.2.2) libgs9 (2 8.61.dfsg.1) libharfbuzz0b (2 0.9.18-3) libicu52 (2 52~m1-1~) libkpathsea6 (0 (null)) libpng12-0 (2 1.2.13-4) libpoppler44 (2 0.24.5) libptexenc1 (0 (null)) libstdc++6 (2 4.6) libx11-6 (0 (null)) libxaw7 (0 (null)) libxmu6 (0 (null)) libxpm4 (0 (null)) libxt6 (0 (null)) zlib1g (2 1:1.1.4) tex-common (2 3) perl (0 (null)) dpkg (18 1.15.4) install-info (0 (null)) texlive-base (0 (null)) luatex (0 (null)) python (0 (null)) ruby (0 (null)) wish (0 (null)) jmpost (0 (null)) jmpost:i386 (0 (null)) makejvf (0 (null)) makejvf:i386 (0 (null)) mendexk (0 (null)) mendexk:i386 (0 (null)) jtex-bin (0 (null)) jtex-bin:i386 (0 (null)) multex-bin (0 (null)) multex-bin:i386 (0 (null)) texlive-base (3 2013) texlive-base:i386 (3 2013) jmpost (0 (null)) jmpost:i386 (0 (null)) mendexk (0 (null)) mendexk:i386 (0 (null)) ptex-bin (0 (null)) ptex-bin:i386 (0 (null)) texlive-base (3 2010) texlive-base:i386 (3 2010) texlive-metapost (3 2010) texlive-metapost:i386 (3 2010) texlive-binaries:i386 (0 (null))
Provides:
2013.20130729.30972-2build3 - texlive-base-bin mendexk makejvf jmpost
Reverse Provides:
texlive-local 2015-1
输出apt-cache showpkg texlive-local
:
Package: texlive-local
Versions:
2015-1 (/var/lib/dpkg/status)
Description Language:
File: /var/lib/dpkg/status
MD5: e297a3a40b6f90f4b600b4e10741a4b7
Reverse Depends:
Dependencies:
2015-1 -
Provides:
2015-1 - xmltex xindy-rules xindy tipa-doc tipa thailatex texlive-xetex texlive-science-doc texlive-science texlive-publishers-doc texlive-publishers texlive-pstricks-doc texlive-pstricks texlive-plain-extra texlive-pictures-doc texlive-pictures texlive-omega texlive-music texlive-metapost-doc texlive-metapost texlive-math-extra texlive-luatex texlive-latex-recommended-doc texlive-latex-recommended texlive-latex-extra-doc texlive-latex-extra texlive-latex-base-doc texlive-latex-base texlive-lang-spanish texlive-lang-portuguese texlive-lang-polish texlive-lang-other texlive-lang-korean texlive-lang-japanese texlive-lang-italian texlive-lang-indic texlive-lang-greek texlive-lang-german texlive-lang-french texlive-lang-european texlive-lang-english texlive-lang-czechslovak texlive-lang-cyrillic texlive-lang-cjk texlive-lang-chinese texlive-lang-arabic texlive-lang-all texlive-lang-african texlive-humanities-doc texlive-humanities texlive-generic-recommended texlive-generic-extra texlive-games texlive-formats-extra texlive-fonts-recommended-doc texlive-fonts-recommended texlive-fonts-extra-doc texlive-fonts-extra texlive-font-utils texlive-extra-utils texlive-common texlive-binaries texlive-bibtex-extra texlive-base texlive tex4ht-common tex4ht tex-gyre t1utils purifyeps psutils ps2eps prosper preview-latex-style pgf passivetex musixtex luatex lmodern lcdf-typetools latexmk latexdiff latex-xcolor latex-sanskrit latex-cjk-thai latex-cjk-korean latex-cjk-japanese-wadalab latex-cjk-japanese latex-cjk-common latex-cjk-chinese-arphic-gkai00mp latex-cjk-chinese-arphic-gbsn00lp latex-cjk-chinese-arphic-bsmi00lp latex-cjk-chinese-arphic-bkai00mp latex-cjk-chinese latex-cjk-all latex-beamer lacheck jadetex fragmaster feynmf dvipng dvidvi context cm-super-minimal cm-super chktex biblatex-dw biblatex
Reverse Provides:
编辑2:输出sudo apt-get install wxmaxima gnuplot-doc texmacs xmaxima maxima-emacs wish maxima-share ttf-jsmath
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'tk' instead of 'wish'
The following extra packages will be installed:
aglfn emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg
emacsen-common fonts-jsmath gnuplot-x11 groff guile-1.8-libs libm17n-0
libotf0 libptexenc1 libtcl8.6 libtk8.6 libwxbase2.8-0 libwxbase3.0-0
libwxgtk2.8-0 libwxgtk3.0-0 m17n-contrib m17n-db maxima maxima-doc
maxima-src maxima-test tcl tcl8.6 texlive-binaries texmacs-common tk8.6
Suggested packages:
emacs24-el m17n-docs wish tcl-tclreadline
Recommended packages:
netpbm ruby libjpeg-progs libjpeg-mmx-progs libtiff-tools ispell
librsvg2-bin xfig libgnomeprintui2.2-0
The following NEW packages will be installed:
aglfn emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg
emacsen-common fonts-jsmath gnuplot-doc gnuplot-x11 groff guile-1.8-libs
libm17n-0 libotf0 libptexenc1 libtcl8.6 libtk8.6 libwxbase2.8-0
libwxbase3.0-0 libwxgtk2.8-0 libwxgtk3.0-0 m17n-contrib m17n-db maxima
maxima-doc maxima-emacs maxima-share maxima-src maxima-test tcl tcl8.6
texlive-binaries texmacs texmacs-common tk tk8.6 ttf-jsmath wxmaxima xmaxima
0 upgraded, 38 newly installed, 0 to remove and 0 not upgraded.
Need to get 78.5 MB of archives.
After this operation, 307 MB of additional disk space will be used.
Do you want to continue? [Y/n]
答案1
好吧,您的发行版有 TeX Live 软件包,因此您可以使用它们:
sudo apt-get install texlive
如果您不想这样做,请参阅https://www.tug.org/texlive/debian.html,特别是“将 vanilla TeX Live 与 Debian 集成”部分。
问题是,由于您在本地安装了 TeX Live,Debian 软件包管理系统不知道 TeX 已安装,因为您没有使用 Debian 软件包系统安装它。
为了解决这个问题,基本的想法是使用 Debian equals 系统创建虚拟 TeX Live Debian 软件包(即没有实际软件内容的软件包),以便软件包管理系统满意必要的 Debian TeX 软件包已安装。或者,换句话说,这些虚拟包将充当您本地安装的 TeX Live 软件的代理。这里使用的具体类型的虚拟包是虚拟包。下面完整引用了相关部分。
要安装 vanilla TeX Live 以替换 Debian 软件包,请执行以下步骤:
在系统范围内以 root 身份安装 vanilla TeX Live。确保安装的唯一 Debian TeX Live 软件包是 tex-common、texinfo,也许还有 lmodern 将 TeX Live 的 bin 目录添加到 /etc/login.defs 中的 ENV_PATH。通过使用 equivs 构建一个虚拟包来向 APT 告知您的 TeX Live 安装:
$ aptitude install equivs # as root mkdir /tmp/tl-equivs && cd /tmp/tl-equivs equivs-control texlive-local # edit texlive-local (see below) $ equivs-build texlive-local $ sudo dpkg -i texlive-local_2015-1_all.deb
在“编辑 texlive-local”步骤中,根据需要编辑维护者字段和本地 TeX Live 安装提供的软件包列表。如果您按照建议安装了 schema-full(除了 collection-texinfo),则该文件应类似于以下 TL 2015 的示例文件。对于较旧的版本,请使用以下示例文件之一:对于 TL 2014、对于 TL 2013、对于 TL 2011。