Problem installing libnet

when I install libnet by sudo apt-get install libnet1, the program cannot find libnet.h, and I also cannot find it in / usr / local / include or / usr / include. so i load libnet and do it but get errors

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
+3
source share
1 answer

It's always the same thing: you need a build package libfoo-devfor the source code from the foo library, because the package just ensures that you can run the code.libfoo

So, here for libnet1: run apt-get install libnet1-dev, and you should ride well.

+12
source

Source: https://habr.com/ru/post/1766412/


All Articles