在`WSL`中的`ubuntu`中安装`webbench`报错处理

WSL中的ubuntu中安装webbench报错fatal error: rpc/types.h: No such file or directory

webbench.c:21:10: fatal error: rpc/types.h: No such file or directory
   21 | #include <rpc/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: webbench.o] Error 1

需要安装libtirpc-dev包:

sudo apt-get install -y libtirpc-dev

加个软连接

sudo ln -s /usr/include/tirpc/rpc/types.h /usr/include/rpc

又报错fatal error: netconfig.h: No such file or directory,再建一个软连接:

sudo ln -s /usr/include/tirpc/netconfig.h /usr/include

再次报错/bin/sh: 1: ctags: not found,安装个ctags:

sudo apt-get install universal-ctags

然后就可以顺利安装webbench了,新的环境缺少很多包,只能一个个装吧。

随便来跑一个,100并发,30秒,百度首页:

webbench -c 100 -t 30 http://www.baidu.com
在`WSL`中的`ubuntu`中安装`webbench`报错处理

原文链接:https://beltxman.com/3874.html,若无特殊说明本站内容为 行星带 原创,未经同意禁止转载。

发表评论

您的电子邮箱地址不会被公开。

Scroll to top