首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装libnet时出现问题

安装libnet时出现问题
EN

Stack Overflow用户
提问于 2010-09-24 22:30:14
回答 1查看 21.8K关注 0票数 4

当我通过sudo apt-get install libnet1安装libnet时,程序找不到libnet.h,在/usr/local/include或/usr/include也找不到它。所以我下载了libnet并创建了它,但是我得到了错误

代码语言:javascript
复制
make -C lib/ lib
make[1]: Entering director `/home/liuqiang/workspace/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/liuqiang/workspace/libnet/lib'
make: *** [lib] error 2
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-09-24 22:33:27

总是一样的:您需要libfoo-dev包来根据foo库中的源代码来构建,因为libfoo包只是确保您可以运行代码。

因此,这里是libnet1:运行apt-get install libnet1-dev,您应该可以很好地工作了。

票数 14
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3788055

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档