AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 34704
Accepted
Kit Sunde
Kit Sunde
Asked: 2011-04-13 06:54:36 +0800 CST2011-04-13 06:54:36 +0800 CST 2011-04-13 06:54:36 +0800 CST

我如何在不求助于 Google 的情况下找出某个包中的内容?

  • 772

我经常发现自己想安装一些东西,但我不确定它在哪个包中。这对我来说很常见:

$ make html
sphinx-build -b djangohtml -d _build/doctrees   . _build/html
make: sphinx-build: Command not found
make: *** [html] Error 127

$ sudo apt-get install sphinx
E: Unable to locate package sphinx

$ sudo apt-get install sphinx-build
E: Unable to locate package sphinx-build

谷歌

$ sudo apt-get install python-sphinx

有没有更好的办法?

package-management
  • 6 6 个回答
  • 12436 Views

6 个回答

  • Voted
  1. Best Answer
    Florian Diesch
    2011-04-13T07:01:49+08:002011-04-13T07:01:49+08:00

    安装apt文件并运行apt-file update

    然后用于apt-file search sphinx-build搜索包含名为sphinx-build的文件的包

    • 32
  2. CPC
    2011-04-13T07:09:01+08:002011-04-13T07:09:01+08:00

    Ubuntu 非常聪明。试着运行它。

    $ sphinx-build
    
    The program 'sphinx-build' is currently not installed.  You can install it by typing:
    sudo apt-get install python-sphinx
    
    • 15
  3. Tich
    2011-04-13T07:01:24+08:002011-04-13T07:01:24+08:00

    我不知道 apt-get 是否可以做到,但无论如何我更喜欢使用 aptitude。

    使用它的搜索命令,你会得到一个包含你正在搜索的字符串的包列表,但这仍然不能完全回答你的问题,因为它没有显示哪个包包含你正在寻找的二进制文件。

    例子:

    sudo aptitude search sphinx
    p   gstreamer0.10-pocketsphinx      - lightweight speech recognition - GStreamer
    p   libpocketsphinx-dev             - lightweight speech recognition - developme
    p   libpocketsphinx1                - lightweight speech recognition - library  
    p   libsphinx-search-perl           - Perl module for Sphinx search engine      
    p   libsphinx2-dev                  - speech recognition library - development k
    p   libsphinx2g0                    - speech recognition library                
    p   libsphinxbase-dev               - Sphinx base libraries - development files 
    p   libsphinxbase1                  - Sphinx base libraries                     
    p   pocketsphinx-hmm-tidigits       - lightweight speech recognition - TIDIGITS 
    p   pocketsphinx-hmm-wsj1           - lightweight speech recognition - WSJ1 acou
    p   pocketsphinx-lm-wsj             - lightweight speech recognition - WSJ langu
    p   pocketsphinx-utils              - lightweight speech recognition - command-l
    p   python-pocketsphinx             - lightweight speech recognition - Python mo
    p   python-pocketsphinx-dbg         - lightweight speech recognition - Python mo
    p   python-repoze.sphinx.autointerf - Sphinx extension that auto-generates API d
    p   python-sphinx                   - tool for producing documentation for Pytho
    p   python-sphinxbase               - Sphinx base libraries - Python module     
    p   python-sphinxbase-dbg           - Sphinx base libraries - Python module (deb
    v   python2.6-pocketsphinx          -                                           
    v   python2.6-pocketsphinx-dbg      -                                           
    v   python2.6-sphinxbase            -                                           
    v   python2.6-sphinxbase-dbg        -                                           
    v   python2.7-pocketsphinx          -                                           
    v   python2.7-pocketsphinx-dbg      -                                           
    v   python2.7-sphinxbase            -                                           
    v   python2.7-sphinxbase-dbg        -                                           
    p   sphinx2-bin                     - speech recognition utilities              
    p   sphinx2-hmm-6k                  - speech recognition library - default acous
    p   sphinxbase-utils                - Sphinx base libraries - utilities         
    p   sphinxsearch                    - Fast standalone full-text SQL search engine
    
    • 3
  4. liori
    2011-04-13T12:23:08+08:002011-04-13T12:23:08+08:00

    我喜欢使用http://packages.ubuntu.com/——里面有“搜索包的内容”。Debian 在http://packages.debian.org也有类似的界面。

    这样做的好处是你可以在没有 CLI 访问 Ubuntu 本身的情况下使用它,通过电话解释事情。

    • 3
  5. Luis Alvarado
    2011-04-13T07:09:22+08:002011-04-13T07:09:22+08:00

    您可以使用我在 apt 上方推荐的 apt 命令组或 aptitude。这是要搜索的列表

    易于

    搜索与您想要的命令类似的内容: apt-cache search X例如,apt-cache search cheese将为您提供与奶酪相关的所有内容。
    要显示它有什么依赖关系和东西你会做apt-cache show cheese。
    当然要安装apt-get install cheese。

    资质

    搜索:aptitude search cheese这将显示一个比 apt 更漂亮的列表
    显示:aptitude show cheese这将再次显示一个更漂亮和友好的列表
    安装:aptitude install cheese安装它。再好看一点。

    aptitude 还为您正在寻找的内容提供更多相关信息,例如:

    apt-cache search phiVS aptitude search phi
    apt-cache search sphiVSaptitude search sphi

    如果你想要一个 GUI 版本,我推荐Synaptic Package Manager或更简单的软件中心。在 Synaptic 中,您可以查找与您正在查找的内容相似的内容,它会显示给您。

    • 1
  6. Hut8
    2014-02-26T14:24:32+08:002014-02-26T14:24:32+08:00

    自动适应

    auto-apt是一个派上用场的包,尤其是 Makefile 和configure脚本,它们引用了您可能没有并且不知道在哪里找到的东西,这对于头文件来说通常很棘手。在这种情况下,您调用make了它,它尝试调用sphinx-build,但找不到它时失败。

    auto-apt run [...]将运行指定的命令,然后指导您安装包含它知道apt-get可以找到和安装的丢失文件的软件包。

    所以,只需调用auto-apt run make html并看看会发生什么:)

    有关更多信息,请参阅auto-apt 的文档

    • 0

相关问题

  • 如何从命令行仅安装安全更新?关于如何管理更新的一些提示

  • 如何从命令行判断机器是否需要重新启动?

  • 有没有办法重置所有包/源并从头开始?

  • 如何回滚到 PHP 5.2?

  • 包管理器之间有什么区别?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    我需要什么命令来解压缩/提取 .tar.gz 文件?

    • 8 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Marko Smith

    如何使用命令行将用户添加为新的 sudoer?

    • 7 个回答
  • Marko Smith

    更改文件夹权限和所有权

    • 9 个回答
  • Martin Hope
    EmmyS 我需要什么命令来解压缩/提取 .tar.gz 文件? 2011-02-09 14:50:41 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve