84

我正在尝试找到ab - 用于 Ubuntu 的 Apache HTTP 服务器基准测试工具,我希望有一个可以为它安装的包。我决定我需要对我的应用程序进行一些简单的负载测试。

4

2 回答 2

128
% sudo apt-get install apache2-utils

Ubuntu 中的 command-not-found 软件包提供了一些巧妙的功能,如果您键入无法解析为可执行文件(或 bash 函数或其他任何内容)的命令,它将查询您的 apt 源并找到包含二进制文件的软件包试图执行。所以,在这种情况下,我ab在命令提示符下输入:


% ab
The program 'ab' is currently not installed.  You can install it by typing:
sudo apt-get install apache2-utils
bash: ab: command not found

于 2008-09-15T20:29:06.533 回答
13

另一种搜索丢失文件的方法,例如,如果您使用 zsh,想要禁用 command-not-found(当您错过命令名时会减慢速度),或者正在寻找不是可执行文件的文件:

$ sudo aptitude install apt-file
$ sudo apt-file update
$ apt-file search bin/ab
于 2009-07-29T12:17:48.733 回答