ubuntu - 在 Ubuntu-9.10 上安装 libnet-0.10.11 时遇到问题

标签 ubuntu libnet

这是我做的... #tar -xzvf libnet-0.10.11.tar.gz #cd libnet

然后我将linux.mak文件复制到父目录下的port.mak文件中。 然后,如文档所述,我在当前目录中使用了 make...

naman@naman-laptop:~/Desktop/Software/libnet$ make
make -C lib/ lib
make[1]: Entering directory `/home/naman/Desktop/Software/libnet/lib'
gcc -O2 -Wall -Werror -Wno-unused -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g -I../include -Iinclude -DTARGET_LINUX   -c -o core/config.o core/config.c
cc1: warnings being treated as errors
core/config.c: In function ‘__libnet_internal__seek_section’:
core/config.c:87: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
core/config.c: In function ‘__libnet_internal__get_setting’:
core/config.c:111: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
make[1]: *** [core/config.o] Error 1
make[1]: Leaving directory `/home/naman/Desktop/Software/libnet/lib'
make: *** [lib] Error 2

谁能详细解释一下这个错误,以及如何纠正它?任何帮助将非常感激。

最佳答案

https://github.com/sam-github/libnet ,那是一个古老的libnet版本,现代的使用autoconf,你需要使用这么旧的吗?

我建议从您正在使用的 makefile 中删除 -Wall-Werror

关于ubuntu - 在 Ubuntu-9.10 上安装 libnet-0.10.11 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4813007/

相关文章:

linux - 我怎样才能重新安装apt?

ubuntu -/usr/bin/ld : cannot find -lfl

c - 使用 libnet 发送 ARP 请求,但 arp 缓存在获得 ARP 回复后不会更新

c - 为什么客户端无法解析libnet构建和发送的http数据包?

ubuntu - libnet 安装问题

c - Libnet基本使用

python - Django 测试运行器在 Ubuntu 上的 virtualenv 中失败

node.js - 带有某些包的 Node "No such file or directory"

docker - 在 github ci 中进入 docker 容器之前如何在主机中运行命令

c - 错误 : ‘LIBNET_ERR_FATAL’ with libnet