如何安装软件包到 Debian Linux 操作系统?

如何安装软件包到 Debian Linux 操作系统?

这次我尝试了很多不同的事情。

最大的问题是我不知道在 apt-get 命令中应该使用什么作为软件包的名称。互联网根本无法帮助我找到应该用来安装给定软件包的名称。我经常访问 Debian 的网站,查找我想要的软件包并找到它,但当我用 apt-get 尝试这个名字时,它不起作用。我也把它复制粘贴到命令行中,但无济于事。

我只想将 CodeBlocks、GCC 和 GDB 安装到基于 Debian 的 Linux 操作系统上。

肯定有一些命令或参考资料可以用来获取我感兴趣的所有软件包的列表吧?我执行了一个命令,它输出了一堆软件包名称,但它输出了太多名称,无法进行合理检查。如果这是非常基础的,我很抱歉,我是一个正在学习的 Linux 用户!我还查看了 apt-get 的手册页,请放心。

答案1

Aptitude 或 synaptic 将为您提供您所寻求的功能。

apt-get 安装 aptitude

或者

apt-get 安装 synaptic

刚刚跑资质或者突触直接。使用 aptitude 作为 curses (终端) 界面,使用 synaptic 作为 GUI。

答案2

$ aptitude search [search term]

是在基于 Debian 的发行版的终端中搜索软件包名称的命令。

我也经常使用

$ aptitude show [package name]

在安装之前检查有关软件包的详细信息,例如建议的软件包等,这些详细信息通常是相关的、有用的工具和/或默认未安装的文档(如果未在 apt.conf 文件中设置)。

我经常使用这些命令,因此我在 .bash_alises 中为它们创建了几个较短的名称:

# aptitude "find":
alias aptf='aptitude search'

# aptitude show:
alias apts='aptitude show'

答案3

我只想将 CodeBlocks、GCC 和 GDB 安装到基于 Debian 的 Linux 操作系统上。

嗯,有时候显而易见的方法会有效。因此,你可以尝试从以下方法开始:

apt-get install gcc gdb codeblocks

这会起到作用。

如果你不想这样做,你可以尝试

apt-file -x search ^/usr/bin/gcc$

这使:

gcc: /usr/bin/gcc
pentium-builder: /usr/bin/gcc

apt-file -x search ^/usr/bin/gdb$

这使

gdb: /usr/bin/gdb
gdb-minimal: /usr/bin/gdb
gdb-python2: /usr/bin/gdb

apt-file -x search ^/usr/bin/codeblocks$

这使:

codeblocks: /usr/bin/codeblocks
codeblocks-dbg: /usr/lib/debug/usr/bin/codeblocks

如果你不知道包中的特定文件,这种方法就行不通了。不过,你仍然可以这样做

apt-cache search gcc

ETC。

另一种方法是使用债务标签。

debtags search "devel::lang:c && devel::compiler && interface::commandline && suite::gnu"

这使:

gcc - GNU C compiler
gcc-4.1 - (short description not available)
gcc-4.1-base - (short description not available)
gcc-4.1-multilib - (short description not available)
gcc-4.3 - (short description not available)
gcc-4.3-base - (short description not available)
gcc-4.4 - (short description not available)
gcc-4.4-base - (short description not available)
gcc-4.6 - GNU C compiler
gcc-avr - GNU C compiler (cross compiler for avr)
gcc-mingw32 - (short description not available)
mingw32-binutils - Minimalist GNU win32 (cross) binutils (transition package)

相似地:

debtags search "devel::lang:c && devel::debugger && suite::gnu"

给出

ddd - The Data Display Debugger, a graphical debugger frontend
gdb - GNU Debugger
gdb-avr - GNU Debugger for avr
gdb-mingw-w64 - Cross-debugger for Win32 and Win64 using MinGW-w64
gdb64 - (short description not available)
gdbserver - GNU Debugger (remote server)
libc6-dbg - GNU C Library: detached debugging symbols
nana - (short description not available)

相关内容