【问题标题】:How do I compile nstat on Linux?如何在 Linux 上编译 nstat?
【发布时间】:2020-10-24 00:34:39
【问题描述】:

我必须编译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

【问题讨论】:

    标签: linux compiler-errors utility


    【解决方案1】:

    问题是这样的:

    /bin/sh: 1: bison: not found
    

    您需要在您的计算机上安装bison。您的操作系统包管理器中可能有一个同名的包。如果您需要更多详细信息,请告诉我们您使用的是哪个 Linux 发行版。

    【讨论】:

    • 我像你说的那样安装了bison,然后它说找不到flex,所以我不得不安装它,然后它工作了!
    猜你喜欢
    • 1970-01-01
    • 2013-02-09
    • 2013-06-30
    • 2012-01-25
    • 2015-08-24
    • 1970-01-01
    • 2016-10-19
    • 2016-06-12
    • 2010-11-12
    相关资源
    最近更新 更多