您的位置:首页 > 产品设计 > UI/UE

ubuntu APT软件管理的辅助工具equivs的使用

2012-03-06 03:36 691 查看
  很多天以前用latex编辑毕业论文,因为ubuntu软件仓库中提供的texlive版本过旧,导致模板无法使用,于是手动安装了texlive2011.这本是违反我的原则的事情,因为这样便破坏了系统本身对软件包的管理,估计日后还会带来无尽的麻烦。但是当时解决了毕业论文模板的使用问题,也就顾不得其它了,只当是权宜之计。今天见某程序员在微博上炫耀maxima-emacs的tex显示效果。于是我也准备安装,于是麻烦开始了

头疼的依赖关系

  执行命令安装maxima-emacs:

sudo apt-get install maxima-emacs


结果同时要装一堆texlive相关的软件包。这样我才想起来原来替代texlive的事情。如果就这样执行了必然导致我的tex又变回老版本,无法正常使用。怎么办呢,有没有什么伪造依赖关系的工具呢?搜索,未果。但是却发现了这个lauchpad的bugs报告:https://bugs.launchpad.net/ubuntu/+source/texlive-base/+bug/712521 .这个报告的讨论很有意思,大家可以看看。里面有人提出愿意出钱支持打包最新版的texlive;有人提出既然不支持,何不把旧版的从仓库和以来关系中删除,让大家全部去texlive的官方页面下载。在38楼看到一条关键信息,顺着这条信息我来到了这个页面 http://tug.org/texlive/debian.html 。原来tug上已经有了解决方案,真不知道它为什么已经意识到这个问题还要自己搞一个tlmgr的管理软件。方案大概就是用工具 equivs制作一个空软件包,这个软件提供所有apt所需的额外安装的texlive包信息。

问题解决

  照例打开终端,输入

equivs-control texlive-local


然后编辑刚刚生成的texlive-local,内容为你已经安装texlive包。默认全部安装,tug提供了一个示例http://tug.org/texlive/files/debian-control-ex.txt

Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: texlive-local
Version: 2011-1~1
Maintainer: you <you@yourdomain.example.org>
Provides: biblatex, biblatex-dw, cm-super, cm-super-minimal, context, dvipng,
feynmf, fragmaster, 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, latex-cjk-xcjk, latexmk, latex-sanskrit,
latex-xcolor, lcdf-typetools, lmodern, luatex, musixlyr, musixtex, 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-doc-base, texlive-doc-bg, texlive-doc-cs+sk, texlive-doc-de,
texlive-doc-el, texlive-doc-en, texlive-doc-es, texlive-doc-fi,
texlive-doc-fr, texlive-doc-it, texlive-doc-ja, texlive-doc-ko,
texlive-doc-mn, texlive-doc-nl, texlive-doc-pl, texlive-doc-pt,
texlive-doc-ru, texlive-doc-si, texlive-doc-th, texlive-doc-tr,
texlive-doc-uk, texlive-doc-vi, texlive-doc-zh, 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-arab, texlive-lang-arabic,
texlive-lang-armenian, texlive-lang-croatian, texlive-lang-cyrillic,
texlive-lang-czechslovak, texlive-lang-danish, texlive-lang-dutch,
texlive-lang-finnish, texlive-lang-french, texlive-lang-german,
texlive-lang-greek, texlive-lang-hebrew, texlive-lang-hungarian,
texlive-lang-indic, texlive-lang-italian, texlive-lang-latin,
texlive-lang-latvian, texlive-lang-lithuanian, texlive-lang-manju,
texlive-lang-mongolian, texlive-lang-norwegian, texlive-lang-other,
texlive-lang-polish, texlive-lang-portuguese, texlive-lang-spanish,
texlive-lang-swedish, texlive-lang-tibetan, texlive-lang-ukenglish,
texlive-lang-vietnamese, texlive-latex3, 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-pstricks, texlive-pstricks-doc, texlive-publishers,
texlive-publishers-doc, texlive-science, texlive-science-doc, texlive-xetex,
texpower, texpower-manual, thailatex, tipa, ttf-freefont, ttf-gfs-artemisia,
ttf-gfs-baskerville, ttf-gfs-bodoni-classic, ttf-gfs-didot,
ttf-gfs-didot-classic, ttf-gfs-gazis, ttf-gfs-neohellenic, ttf-gfs-olga,
ttf-gfs-porson, ttf-gfs-solomos, ttf-gfs-theokritos, ttf-sil-gentium, xindy,
xindy-rules
Architecture: all
Description: My local installation of TeX Live 2011.
A full "vanilla" TeX Live 2011 http://tug.org/texlive/debian#vanilla[/code] 
可能跟我后面的安装有关,后来我在上面的文件中加入了texlive-base-bin才得以正常。保存后

equivs-build texlive-local


然后安装刚刚生成的deb。然后重试安装maxima-emacs这次果然不需要一堆texlive了,但是依然需要texlive-common和texlive-binaries这两个包,查看刚才的文件包含了这两个包的,真是奇怪,尝试重复上面的步骤生成名字跟这两个相同的包,版本号格式仿照他们原来的格式(texlive-common 2009-15改成了2011--16)。安装好,不再有问题。正常安装maxima-emacs。

最终成果

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: