首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Ubuntu上编译Wireshark输出许多重声明错误

在Ubuntu上编译Wireshark输出许多重声明错误
EN

Ask Ubuntu用户
提问于 2017-02-10 16:44:55
回答 1查看 382关注 0票数 3

我正在Ubuntu为ZBOSS安装Wireshark

当我试图重建时,我会得到以下错误:

代码语言:javascript
复制
In file included from /usr/include/glib-2.0/glib/gdir.h:32:0,
                 from /usr/include/glib-2.0/glib.h:45,
                 from packet-gluster_cli.c:38:
packet-gluster.h:359:2: error: redeclaration of enumerator 'DT_UNKNOWN'
  DT_UNKNOWN = 0,
  ^
/usr/include/dirent.h:99:5: note: previous definition of 'DT_UNKNOWN' was here
     DT_UNKNOWN = 0,
     ^
packet-gluster.h:360:2: error: redeclaration of enumerator 'DT_FIFO'
  DT_FIFO = 1,
  ^
/usr/include/dirent.h:101:5: note: previous definition of 'DT_FIFO' was here
     DT_FIFO = 1,
     ^
packet-gluster.h:361:2: error: redeclaration of enumerator 'DT_CHR'
  DT_CHR = 2,
  ^
/usr/include/dirent.h:103:5: note: previous definition of 'DT_CHR' was here
     DT_CHR = 2,
     ^
packet-gluster.h:362:2: error: redeclaration of enumerator 'DT_DIR'
  DT_DIR = 4,
  ^
/usr/include/dirent.h:105:5: note: previous definition of 'DT_DIR' was here
     DT_DIR = 4,
     ^
packet-gluster.h:363:2: error: redeclaration of enumerator 'DT_BLK'
  DT_BLK = 6,
  ^
/usr/include/dirent.h:107:5: note: previous definition of 'DT_BLK' was here
     DT_BLK = 6,
     ^
packet-gluster.h:364:2: error: redeclaration of enumerator 'DT_REG'
  DT_REG = 8,
  ^
/usr/include/dirent.h:109:5: note: previous definition of 'DT_REG' was here
     DT_REG = 8,
     ^
packet-gluster.h:365:2: error: redeclaration of enumerator 'DT_LNK'
  DT_LNK = 10,
  ^
/usr/include/dirent.h:111:5: note: previous definition of 'DT_LNK' was here
     DT_LNK = 10,
     ^
...
...
packet-gluster.h:365:2: error: redeclaration of enumerator 'DT_LNK'
  DT_LNK = 10,
  ^
/usr/include/dirent.h:111:5: note: previous definition of 'DT_LNK' was here
     DT_LNK = 10,
     ^
packet-gluster.h:366:2: error: redeclaration of enumerator 'DT_SOCK'
  DT_SOCK = 12,
  ^
/usr/include/dirent.h:113:5: note: previous definition of 'DT_SOCK' was here
     DT_SOCK = 12,
     ^
packet-gluster.h:367:2: error: redeclaration of enumerator 'DT_WHT'
  DT_WHT = 14
  ^
/usr/include/dirent.h:115:5: note: previous definition of 'DT_WHT' was here
     DT_WHT = 14
     ^
Makefile:6923 : la recette pour la cible « libdissectors_la-packet-gluster_pmap.lo » a échouée
make[5]: *** [libdissectors_la-packet-gluster_pmap.lo] Erreur 1

知道我该怎么解决吗?

EN

回答 1

Ask Ubuntu用户

发布于 2018-11-02 17:24:36

当我试图在Ubuntu18.04上编译Wireshark 1.8.8时,我得到了这个错误。我能够成功地使用这个链接中提到的修补程序编译wireshark。修复是为fedora 25,但是我测试了它,它也在Ubuntu18.04上工作。

在这里,我提供了成功编译所需的部分引用(请注意,对于其他版本,行号可能有所不同)。第一个解决你的问题,但其他(独立)问题也将提出,以及这些可以与其他两个项目列出的固定。

  • 编辑epan/dissectors/packet-gluster.h并在第357行完全删除gluster_entry_types枚举。
  • g_memmove的定义从packaging/macosx/native-gtk/glibconfig.h复制到第81行,并粘贴到文件ui/gtk/export_object_smb.cepan/dissectors/packet-ssl-utils.c的第一行。为了方便起见,下面是g_memmove的定义:#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
  • 更新文件AUTHORS,并将名称Peter Kovář替换为Peter Kovar,将Роман Донченко替换为Roman Donchenko,这是只包含ASCII字符的字符串。
票数 2
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/881983

复制
相关文章

相似问题

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