This is our old Q&A Site. Please post any new questions and answers at

I wish to build a source rpm package but for only the command-line components of wirshark 2.0.1. Looking at previous queries this looked possible by first specifying "--disable-wireshark" for the configure script argument. This appears successful for the configure stage and when running just "make".

However if I wish to use the provided rpm spec content and then run:

make rpm-package

this fails the configure check with :

configure: error: Neither Qt nor GTK+ 2.12.0 or later are available, so Wireshark can't be compiled

I have also tried modifying the spec so that all gui conditions options are excluded - e.g "%bcond_without qt " and can see this relected in with: RPMBUILD_WITH_ARGS = --without gtk2 --without gtk3 --without qt --without qt5 --without lua

However the configure check fails before reading the spec. for the rpmbuild

asked 08 Jan '16, 08:10

windymc's gravatar image

accept rate: 0%

In general the RPM generation assumes you're building both the GUI and CLI. Once built you can install only the CLI but it's set up so you do actually have to build both.

If that's not possible (because the system you're compiling on doesn't have Qt nor Gtk) then you'll need to hack up the spec file. Keep in mind that ./configure is run (again) within the spec file so you'll need to take out not only all the %if %{with qt} || %{with qt5} stuff but you'll also have to modify the ./configure arguments to add "--disable-wireshark".

In other words when you (manually) run ./configure (before make rpm-package) only some of the options are passed in to the RPM generation; "--disable-wireshark" is not among them. (It would be possible to do that but it would be a-whole-nother layer of conditionals in the spec file; thus far that's looked like too much of a pain to me.)

permanent link

answered 08 Jan '16, 09:54

JeffMorriss's gravatar image

JeffMorriss ♦
accept rate: 27%

As below, Had to do a bit a more work with the spec than just take out the qt & gtk package sections and adding "--disable-wireshark". But have now built the source rpm so thanks for your help Jeff:-)

  1. "--disable-warnings-as-errors" parameter is not known so removed it .

  2. And also rpmbuild fails with "could not find file" due to following: %exclude %{_bindir}/wireshark*

%exclude %{_mandir}/man1/wireshark.* %exclude %{_datadir}/applications/wireshark-gtk.desktop removed them. Even though the purpose of them is to say don't worry about including them, rpm logic has to verify that they exist and then exclude them !

(11 Jan '16, 08:42) windymc
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 Jan '16, 08:10

question was seen: 1,054 times

last updated: 11 Jan '16, 08:42

p​o​w​e​r​e​d by O​S​Q​A