AI编程生活评测

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

编程笔记 / 2022-09-23 / 1 min
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
点击刷新