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

Error: Failed build dependencies while making rpm


Hi all, I 'm building the rpm of Wireshark but got this problem: alt text

I checked the version of those dependencies and know for sure that satisfies these conditions: alt text

alt text

About glib2-devel, libcap-devel, zlib-devel, c-ares-devel, lua-devel are also installed. rpm, as you se, is 4.10 gtk-devel: 2.0 and 3.0 Destop-file-utils: I downloaded from web and installed then got a message that inform later version is already installed. So, what is the problem, how can I know what the next step is, how to check what is wrong?

Thank you, guys so much!

asked 18 Sep '13, 01:37

hoangsonk49's gravatar image

accept rate: 28%

edited 20 Sep '13, 12:06

Kurt%20Knochner's gravatar image

Kurt Knochner ♦

More information. I run "make" and "make install" successfully but to generate Rpm, now, still in stuck

(18 Sep '13, 02:00) hoangsonk49

2 Answers:


Um, I thought that you were running Ubuntu (based on your previous questions and the fact that you're using apt-get). So why are you trying to build an RPM? Ubuntu does not (AFAIK) use RPM it uses Debian's packaging system. So you can't build RPMs you have to build .deb's or whatever they are.

OTOH you say that your system has an rpm command so maybe I'm off base here...

answered 18 Sep '13, 07:17

JeffMorriss's gravatar image

JeffMorriss ♦
accept rate: 27%

good spot!

(18 Sep '13, 08:24) grahamb ♦

Hi Jeff, thank a ton for your good idea. I'm trying to build rpm because our server is using CentOS .I install Ubuntu just because I'm familiar with it since I studied at Univ. I check rpm --version RPM version 4.10.1 so I think it 's possible to build rpm package. I also don't see any warning or Tips in the developer guide when they mention how to generate binary package. I think maybe your idea could be a solution, so I'm going to install CentOS instead of Ubuntu. Hope that it could be done:-)

(18 Sep '13, 18:20) hoangsonk49

Yeah I haven't a clue whether it would be possible to build an RPM on Ubuntu that actually works on CentOS. I find it very odd that Ubuntu even has the rpm command.

I think that even if you could build an RPM on Ubuntu it would not work on CentOS. Ubuntu probably has different versions of just about all the dependencies.

In that vein, also keep in mind that when installing CentOS should install the same (major) version as the server. CentOS 5 has much older packages than CentOS 6. Also, to save you some trouble: the last versions of Wireshark that can be easily built on CentOS 5 are the 1.6.x versions. CentOS 6 will support 1.8.x through the current trunk (I think; I haven't actually tried building trunk on it).

(19 Sep '13, 07:06) JeffMorriss ♦

Oh, one more comment: you had asked somewhere (but I can't find the comment in here now) the CentOS equivalent of apt-get build-dep wireshark. I don't think CentOS has an equivalent, but Wireshark (in the SVN version) has a script which should do it: tools/

(19 Sep '13, 13:23) JeffMorriss ♦

thank you, JeffMorriss, it is truly very useful for me

(19 Sep '13, 18:04) hoangsonk49

I don't think CentOS has an equivalent,

well, there is an equivalent

yum-builddep wireshark

but that does not help anything, as CentOS still ships Wireshark 1.2.x, so the dependencies for that will certainly not be good enough to build any recent release.

I'd go with your suggestion Thanks for that hint. I did not know the script.

(20 Sep '13, 10:50) Kurt Knochner ♦

FYI: I just built trunk (svn 52156) on CentOS 6.4 x64. Here is what I did.

  • Install CentOS 6.4 x64 - Development Workstation
  • svn checkout
  • run the script wireshark/tools/ which installed these additional packages (asciidoc, c-ares-devel, libpcap-devel, lua-devel)
  • ./
  • ./configure --with-gtk2=yes --with-gtk3=no (GTK3 is not available on CentOS 6.x!!)
  • make
  • ./wireshark

Works without any problems so far (well, with the typical root privilege problems - which can be solved by using setcap).

Building an rpm package works as well, however it needs some tweaking, as the SPECS file disables GTK3 by default (%global with_gtk3 0), but it does not enable GTK2. So, after fixing the SPECS file (wireshark.spec.*) it works.

  • make rpm-package
  • rpm -ihv packaging/rpm/RPMS/x86_64/wireshark-1.11.0-1.x86_64.rpm
  • rpm -ihv packaging/rpm/RPMS/x86_64/wireshark-gnome-1.11.0-1.x86_64.rpm
  • Add your user to the wireshark group (sudo usermod -G wireshark user1)
  • log out and login again, otherwise the group settings will not be applied
  • /usr/local/bin/wireshark


the SPECS file is fixed in r52161, so you may not have to change it if you check out the latest revision (while reading this).

Fixed SPECS file

%if %{with_gtk3}
  --with-gtk3 \
  --with-gtk2 \ 
(20 Sep '13, 12:01) Kurt Knochner ♦

I fixed the spec file in r52161, thanks for pointing that out!

But I'm confused as to why you needed to manually run setcap. The spec file defaults to installing dumpcap with the appropriate capabilities (it also defaults to installing dumpcap so it's only executable by members of the 'wireshark' group--was the problem that you're not a member of that group?).

(20 Sep '13, 13:54) JeffMorriss ♦

But I'm confused as to why you needed to manually run setcap.

My mistake. I did not login again and thus the wireshark group was not yet applied to my account. As I did not check that in the first place, I assumed a problem with setcap and thus I ran it together with chmod a+rx on dumpcap :-)

BTW: getcap returns the right capabilities for dumpcap after the package installation, so everything is O.K.

I fixed my comment above.

(20 Sep '13, 14:07) Kurt Knochner ♦
showing 5 of 9 show 4 more comments


make rpm-package uses rpmbuild to build the rpm package. rpmbuild uses rpm (actually it uses the rpm database) to figure out if the required packages are installed on the system (autoconf, etc.). However, even if you have rpm on a Debian based system (Ubuntu), rpm -qa will return zero packages, as none are installed through rpm. So, rpmbuild complains about the missing packages.

You may be able to work around that, but how much sense does it make to build an rpm package on a debian based system? ;-)


answered 19 Sep '13, 01:53

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
accept rate: 15%

edited 19 Sep '13, 01:56

Thanks Kurt, I understand the problem, so I will generate the debian package first and try with my Ubuntu. If my code modification runs successfully, I will put all the code to centOS and build rpm. The reason for rpm pack is our server using centOS. Anw, thanks for all your comments and solutions.

(19 Sep '13, 02:09) hoangsonk49

will put all the code to centOS and build rpm.

see my last comment in the accepted answer.

(20 Sep '13, 12:03) Kurt Knochner ♦