设为首页 收藏本站
查看: 930|回复: 0

[经验分享] ubuntu12.04TLS下源码编译安装wireshark

[复制链接]

尚未签到

发表于 2018-5-1 12:20:12 | 显示全部楼层 |阅读模式
  一、环境以及一些源码说明
  系统:ubuntu12.04TLS 64位
  源码:wireshark-1.12.7.tar.bz2,libtool-2.4.6.tar.gz ,libpcap-1.7.4.tar.gz

  安装路径: /opt/wireshark
  

  二、安装步骤
  1. 首先安装一些依赖的工具以及库
  sudo apt-get update 先更新下软件镜像站点

  sudo apt-get install flex
  sudo apt-get install bison
  sudo apt-get install autoconf
  sudo apt-get install libqt4-dev
  sudo apt-get install libgtk2.0-dev
  安装libtool(使用源码安装):
  (1)解压$tar -xzf libtool-2.4.6.tar.gz
  (2)进入解压后的目录 $cd libtoo-2.4.6
  (3) 安装三部曲 $./configure; make ; sudo make install
  

  2.安装libcap
  (1) 解压 $tar -xzf libpcap-1.7.4.tar.gz
  (2) 进入解压后的目录 $cd libpcap-1.7.4
  (3) $./configure
  (4) $make

  (5) $sudo make install

  3.然后解压wiresharek源码,进入解压目录,进行安装三部曲。
  (1) $tar -xjf wiresharek-1.12.7.tar.bz2
  (2) $cd wiresharek-1.12.7
  (3) $./configure --prefix=/opt/wireshark --with-gtk2 (因为默认使用gtk3,所以指定使用gtk2)
  (4) $make

  (5) $sudo make install
  

  三、安装过程中遇到的问题以及解决方法
  (1)安装libpcap时
  <1> $./configure

  报错:
                      checkingfor flex... no
                      checkingfor bison... no
                      checkingfor capable lex... insufficient
                      configure:error: Your operating system's lex is insufficient to compile
                      libpcap.  flex is a lex replacement that has many advantages,including
                      being able to compile libpcap.  For more information, see
                     http://www.gnu.org/software/flex/flex.html .

  解决:
   $sudo apt-get install flex
  <2>$make
  报错:

  ./runlex.shlex -oscanner.c scanner.l
                      mvscanner.c scanner.c.bottom
                      cat./scanner.c.top scanner.c.bottom > scanner.c
                      yacc-d grammar.y
                      make:yacc:命令未找到
                      make:*** [grammar.c] 错误 127
  解决:
   $sudoapt-get install bison
  (2)编译wireshark
  <1>$./autogen.sh
  报错:
       ./autogen.sh:1: ./autogen.sh: autoconf: not found

                  Youmust have autoconf 2.60 or later installed to compile Wireshark.
                  Downloadthe appropriate package for your distribution/OS,
                  orget the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/
                  ./autogen.sh:1: ./autogen.sh: automake: not found
                  Youmust have automake 1.9 or later installed to compile Wireshark.
                  Downloadthe appropriate package for your distribution/OS,
                  orget the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/
                  ./autogen.sh:1: ./autogen.sh: libtool: not found
                  Youmust have libtool 1.4 or later installed to compile Wireshark.
                  Downloadthe appropriate package for your distribution/OS,
                  orget the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/
  解决:
   $sudoapt-get insall autoconf
                  安装libtool

  <2>$./configure --prefix=/opt/wireshark

  报错:
   checkingfor pkg-config... /usr/bin/pkg-config
                  checkingfor Qt5Core - version >= 4.6.0... no
                  checkingfor QtCore - version >= 4.6.0... no
                  configure:error: Qt is not available
  解决:
     $sudoapt-get install libqt4-dev
  再次运行$./configure–-prefix=/opt/wireshark
  报错:
      gtk+3no available
  解决:
     $sudoapt-get install libgtk2.0-dev 第一次没有找到

    $sudoapt-get update 更新镜像站点,找到

                  $sudoapt-get install libgtk2.0-dev
  再次运行$./configure --prefix=/opt/wireshark
       依然报错 gtk+3 no available
  解决:

     $./configure --prefix=/opt/wireshark --with-gtk2

  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-454386-1-1.html 上篇帖子: Ubuntu下卸载mysql5.5 下篇帖子: Ubuntu 14.04 LTS关于缺少libglut.so.3的解决办法
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表