settingsLogin | Registersettings
리눅스 관련 모든 질문답변을 올려주세요! 100% 무료입니다! -Ask Ubuntu KR
Show Menu

libnet 설치하려는데 오류가 납니다.

0 좋아요 0 싫어요

./../include/./libnet/libnet-functions.h:1433:1: warning: inline function ‘libnet_getgre_length’ declared but never defined
 libnet_getgre_length(u_int16_t fv);
 ^
gcc  -g -O2 -Wall   -o bgp4_notification  bgp4_notification.o ../src/libnet.a 
gcc -DHAVE_CONFIG_H -I. -I. -I../include     -g -O2 -Wall -c `test -f 'gre.c' || echo './'`gre.c
gre.c: In function ‘main’:
gre.c:180:11: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
   routing = optarg;
           ^
gre.c:319:36: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
  size += LIBNET_GRE_SRE_H + strlen(routing);
                                    ^
In file included from ./../include/libnet.h:64:0,
                 from ./libnet_test.h:13,
                 from gre.c:81:
/usr/include/string.h:394:15: note: expected ‘const char *’ but argument is of type ‘u_char * {aka unsigned char *}’
 extern size_t strlen (const char *__s)
               ^
gre.c:323:13: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
      strlen(routing),                        /* routing length */
             ^
In file included from ./../include/libnet.h:64:0,
                 from ./libnet_test.h:13,
                 from gre.c:81:
/usr/include/string.h:394:15: note: expected ‘const char *’ but argument is of type ‘u_char * {aka unsigned char *}’
 extern size_t strlen (const char *__s)
               ^
gre.c:382:13: warning: pointer targets in passing argument 1 of ‘libnet_autobuild_ethernet’ differ in signedness [-Wpointer-sign]
             "11:11:11:11:11:11",                                    /* ethernet
             ^
In file included from ./../include/libnet.h:124:0,
                 from ./libnet_test.h:13,
                 from gre.c:81:
./../include/./libnet/libnet-functions.h:505:1: note: expected ‘u_int8_t * {aka unsigned char *}’ but argument is of type ‘char *’
 libnet_autobuild_ethernet(u_int8_t *dst, u_int16_t type, libnet_t *l);
 ^
gre.c: At top level:
./../include/./libnet/libnet-functions.h:1433:1: warning: inline function ‘libnet_getgre_length’ declared but never defined
 libnet_getgre_length(u_int16_t fv);
 ^
gcc  -g -O2 -Wall   -o gre  gre.o ../src/libnet.a 
gre.o: In function `main':
/home/ubuntu2/Downloads/libnet/sample/gre.c:336: undefined reference to `libnet_getgre_length'
collect2: error: ld returned 1 exit status
Makefile:482: recipe for target 'gre' failed
make[1]: *** [gre] Error 1
make[1]: Leaving directory '/home/ubuntu2/Downloads/libnet/sample'
Makefile:166: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

자꾸 이런 오류가 나서 설치가 안되는거 같은데 어떻게 해결해야 할까요

문의 2016 9월 10 기타 stater
  

1 답변

0 좋아요 0 싫어요
뭘 하시려는지 모르겠습니다만.. 일단 libnet 패키지를 설치해보세요..

sudo apt-get install libnet1-dev
답변됨 2016 9월 28 drake
Hosting by Microsoft MeltingPot/maru intermet
...