按内容搜索软件包仓库

我正在寻找一个特定的LaTeX输入文件,但在存储库中找不到它。
我相当确定存储库可以通过内容进行搜索,因为以下命令(搜索LaTeX输入文件amsmath.sty)是成功的:
# apt-cache search amsmath
texlive-latex-base - TeX Live: Basic LaTeX packages
texlive-doc-it - TeX Live: Italian documentation
texlive-latex-extra - TeX Live: LaTeX supplementary packages
texlive-math-extra - TeX Live: Advanced math typesetting

我正在寻找的特定TeX输入文件没有返回任何结果(apt-cache search breqn)。我可以假设在存储库中没有任何软件包中存在breqn.sty,因此可以通过其他方式(例如CTAN)来寻找它吗?或者可能还有其他方法来搜索软件包内容吗?
2个回答

你可以使用apt-file在软件包中搜索文件。
sudo apt-get install apt-file

# Update database
sudo apt-file update

# Search for files
apt-file search foo

# or in your case
apt-file search breqn.sty

我得到了 texlive-latex3: /usr/share/texmf-texlive/tex/latex/mh/breqn.sty,所以...
sudo apt-get install texlive-latex3

请参阅http://www.debuntu.org/how-to-find-missing-packages-with-apt-file

感谢提到 apt-file update。我原本以为 apt-get update 也会适用于 apt-file,但事实证明并非如此。 - user001


1@user001 这是关于Ubuntu的网站,不是Debian,如果你有关于Debian的问题,请到unix.stackexchange.com提问。 - Jorge Castro
1其实,算了吧,它起作用了。正如@bodhi-zazen所指出的那样,我需要运行apt-file update。我以为apt-get update就足够了,但我猜他们维护着不同的软件包缓存。我知道在这种情况下,结果对Ubuntu和Debian用户都同样有用,所以我才发帖。我两者都使用。 - user001
1@user001 当我在我的设备上安装它时,它会自动提示我更新。不过为了确保,我已经更新了我的回答。 - Jorge Castro
谢谢。原来我系统中已经安装了apt-file,只是没有意识到,这就是为什么没有提示我安装它的原因。可能我已经有一段时间没有运行apt-file update了。 - user001