linux - 如何在Linux上编译nstat?

标签 linux compiler-errors utility

我必须在https://github.com/shemminger/iproute2/blob/main/misc/nstat.c中编译nstat代码,但我认为如果没有ELF支持它就无法编译,我检查了互联网上可以安装它们的方法,但它们非常令人困惑。
如果您能帮助我,那就太好了。
对于更多上下文,这是我尝试制作的文件:

root@mandy-VirtualBox:/home/mandy/iproute2# make

    lib
    make[1]: Nothing to be done for 'all'.
    
    ip
    make[1]: Nothing to be done for 'all'.
    
    tc
        YACC     emp_ematch.tab.c
    /bin/sh: 1: bison: not found
    make[1]: *** [Makefile:185: emp_ematch.tab.c] Error 127
    make: *** [Makefile:64: all] Error 2
然后是我的./configure结果:
root@mandy-VirtualBox:/home/mandy/iproute2# ./configure
TC schedulers
 ATM    no

libc has setns: yes
SELinux support: yes
ELF support: no
libmnl support: yes
Berkeley DB: yes
need for strlcpy: yes
libcap support: yes

最佳答案

问题是这样的:

/bin/sh: 1: bison: not found
您需要在计算机上安装bison。 OS软件包管理器中可能有同名的软件包。如果您需要更多细节,请告诉我们您使用的是哪个Linux发行版。

关于linux - 如何在Linux上编译nstat?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64508861/

相关文章:

Ubuntu 上的 Java 安装问题

linux - crontab 日志目录?

java - 与 ArrayList 的合并排序

python - 如何为 MacOS for python 3.9 解决 "Preparing wheel metadata ... error"这个错误

linux - 有没有办法在 posix shell 或 bash 中扇出流?

java - java/android 中的时间 + 应用程序崩溃

java - java.util.* 包是否仅适用于实用程序类?

linux - Bash 脚本、Expect 和与远程 CLI 的接口(interface)

linux - ARM C++ 交叉编译 : usual default includes available?

使用 makefile 编译 C 项目