ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-users: Re: [Wireshark-users] Building Wireshark from source

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 22 Jun 2015 09:22:56 -0700
On Jun 22, 2015, at 5:03 AM, "Leppihalme, Mika (Nokia - FI/Tampere)" <mika.leppihalme@xxxxxxxxx> wrote:

> Installed wireshark-1.99.7  with instructions:
>  
> https://www.wireshark.org/docs/wsug_html_chunked/ChBuildInstallUnixBuild.html
>  
> Everything went ok until make command  (make & make install do not work
>  
> [root@yyy wireshark-1.99.7]# uname -a
> Linux yyy 2.6.32-504.16.2.el6.x86_64 #1 SMP Tue Mar 10 17:01:00 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

Are you building as root?  It's probably best to do the build as yourself, rather than as root; do only the "make install" as root.

> [root@yyy wireshark-1.99.7]# ll
> drwxr-xr-x  31 1001 wireshark     4096 Jun 22 14:42 wireshark-1.99.7
> -rw-r--r--   1 root root      30137558 Jun 22 14:34 wireshark-1.99.7.tar.bz2
> drwxr-xr-x.  8 root root          4096 Jun  5 13:53 www
> drwxr-xr-x.  2 root root          4096 Jun 28  2011 yp
> [root@yyy var]# bzip2 -d wireshark-1.99.7.tar.bz2
> [root@yyy var]# tar xf wireshark-1.99.7.tar.bz2
> tar: wireshark-1.99.7.tar.bz2: Cannot open: No such file or directory
> tar: Error is not recoverable: exiting now

As the Wireshark build documentation says, on Linux or other OSes using GNU tar, tar can decompress the bzip2 file itself, so you could just have done "tar xf wireshark-1.99.7.tar.bz2" without doing "bzip2 -d wireshark-1.99.7.tar.bz2"

(On other UN*Xes, "bzip2 -d wireshark-1.99.7.tar.bz2" would have created wireshark-1.99.7.tar and deleted wireshark-1.99.7.tar.bz2, so, as the Wireshark build documentation says, you would do "tar xf wireshark-1.99.7.tar" after that.)

> [root@yyy1 var]# cd wireshark-1.99.7

So it looks as if you've unpacked the tarball anyway.

> [root@yyy wireshark-1.99.7]# vi config.nmake

"config.nmake" is for Windows, not UN*X.  You don't need to do anything with it.

> [root@yyy wireshark-1.99.7]# Wireshark
> -bash: Wireshark: command not found
> [root@yyy wireshark-1.99.7]# wireshark
> -bash: wireshark: command not found

You haven't built Wireshark yet, so there's nothing to run.

> [root@yyy wireshark-1.99.7]# vi config.nmake
> [root@yyy wireshark-1.99.7]# make
> make: *** No targets specified and no makefile found.  Stop.

As Pascal Quantin said, you need to run the configure script first, with the command "./configure".