使用通过 apt-get 安装的包时找不到命令

Command not found when using a package installed with apt-get

我习惯了 apt-get,但今天我被一些非常简单的事情困住了。我在 Debian 8 VM 上,需要使用 gethostip。因为它是 syslinux 的一部分,所以这是我所做的:

$ sudo apt-get install syslinux
$ gethostip -d localhost

然而它 returns 我 bash: gethostip: command not found。我也尝试 which gethostip 找到包裹,但 returns 什么都没有。

我应该怎么做才能让它发挥作用?

gethostip 不是 syslinux 二进制包的一部分。

Debian 选择将 syslinux(源代码包)拆分为多个二进制(== 可安装)包,以允许 people/dependencies 只安装他们需要的组件。例如。如果您不想创建可引导 CD,那么您很可能不需要 isolinux 软件包。

包含 /usr/bin/gethostip 的包名为 syslinux-utils

您可以使用 search on packages.debian.org 找出安装给定文件的包。

或者您可以安装 command-not-found package,当您在 cmdline 上键入未知命令时,它会建议您安装哪个包。