Avatar of lolaferrari
lolaferrari
Flag for United Kingdom of Great Britain and Northern Ireland asked on

rpm install src

I'm having a problem installing a source rpm - is this the correct way to do it?

[root@machine sysconfig]# rpm -ivv tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm
D: ============== tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm
D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key
D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key
D: loading keyring from rpmdb
D: opening  db environment /var/lib/rpm cdb:mpool:joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Name rdonly mode=0x0
D:  read h#    1057 Header sanity check: OK
D: added key gpg-pubkey-c105b9de-4e0fd3a3 to keyring
D: Using legacy gpg-pubkey(s) from rpmdb
error: tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm: not an rpm package (or package manifest):
D:       added source package [0]
D: found 1 source and 0 binary packages
D: closed   db index       /var/lib/rpm/Name
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm
Linux

Avatar of undefined
Last Comment
wesly_chen

8/22/2022 - Mon
legolasthehansy

try
 rpm --rebuild tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm
and then
rpm -ivh /usr/src/redhat/RPMS/tcpdump.version.rpm
lolaferrari

ASKER
I downloaded the file from here and ran the command from the same fir that the rpm was downloaded to

[root@testbox tmp]# wget http://rpm.pbone.net/index.php3/stat/3/srodzaj/2/search/tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm
--2011-08-08 20:04:49--  http://rpm.pbone.net/index.php3/stat/3/srodzaj/2/search/tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm
Resolving rpm.pbone.net... 85.14.85.4
Connecting to rpm.pbone.net|85.14.85.4|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm”

    [ <=>                                   ] 10,475      --.-K/s   in 0.07s  

2011-08-08 20:04:49 (153 KB/s) - “tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm” saved [10475]

[root@testbox tmp]# ls -l tcpdump*
-rw-r--r--. 1 root root 10475 Aug  8 20:04 tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm
-rw-r--r--. 1 root root 10475 Aug  8 20:04 tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm.1
[root@testbox tmp]# rpm --rebuild tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm
--rebuild: unknown option
[root@testbox tmp]# rpm -ivh tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm
error: tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm: not an rpm package (or package manifest):
wesly_chen

try
rpmbuild --rebuild tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm

Make sure rpm-build is installed.
yum install rpm-build
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
legolasthehansy

Sorry
Can you try rpmbuild --rebuild

If the command rpmbuild is not found you will need to install rpm-build package to install from source RPM packages.

If you have yum, have you tried yum install tcpdump
legolasthehansy

Argh! Sorry again. didnt mean to post twice..
:)
lolaferrari

ASKER
[root@testbox ~]# rpm --verify rpm-build
[root@testbox ~]# rpm -qi rpm-build-4.8.0-12.el6.i686
Name        : rpm-build                    Relocations: (not relocatable)
Version     : 4.8.0                             Vendor: CentOS
Release     : 12.el6                        Build Date: Fri 12 Nov 2010 12:21:43 AM GMT
Install Date: Mon 08 Aug 2011 07:40:30 PM BST      Build Host: c5b2.bsys.dev.centos.org
Group       : Development/Tools             Source RPM: rpm-4.8.0-12.el6.src.rpm
Size        : 311998                           License: GPLv2+
Signature   : RSA/8, Sun 03 Jul 2011 05:45:31 AM BST, Key ID 0946fca2c105b9de
Packager    : CentOS BuildSystem <http://bugs.centos.org>
URL         : http://www.rpm.org/
Summary     : Scripts and executable programs used to build packages
Description :
The rpm-build package contains the scripts and executable programs
that are used to build packages using the RPM Package Manager.

[root@testbox ~]# rpm -qi rpm-build-4.8.0-12.el6.i686
Name        : rpm-build                    Relocations: (not relocatable)
Version     : 4.8.0                             Vendor: CentOS
Release     : 12.el6                        Build Date: Fri 12 Nov 2010 12:21:43 AM GMT
Install Date: Mon 08 Aug 2011 07:40:30 PM BST      Build Host: c5b2.bsys.dev.centos.org
Group       : Development/Tools             Source RPM: rpm-4.8.0-12.el6.src.rpm
Size        : 311998                           License: GPLv2+
Signature   : RSA/8, Sun 03 Jul 2011 05:45:31 AM BST, Key ID 0946fca2c105b9de
Packager    : CentOS BuildSystem <http://bugs.centos.org>
URL         : http://www.rpm.org/
Summary     : Scripts and executable programs used to build packages
Description :
The rpm-build package contains the scripts and executable programs
that are used to build packages using the RPM Package Manager.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
lolaferrari

ASKER
[root@testbox ~]# rpm -qa | grep rpm-build
rpm-build-4.8.0-12.el6.i686
wesly_chen

So can you run
rpmbuild --rebuild tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm

to list where the files are installed in installed rpm package do
rpm -ql rpm-build    (lower case L)
lolaferrari

ASKER
[root@testbox tmp]# rpmbuild --rebuild tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm
Installing tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm
error: tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm cannot be installed


[root@testbox tmp]# rpm -ql rpm-build
/usr/bin/gendiff
/usr/bin/rpmbuild
/usr/lib/rpm/brp-compress
/usr/lib/rpm/brp-java-gcjcompile
/usr/lib/rpm/brp-python-bytecompile
/usr/lib/rpm/brp-strip
/usr/lib/rpm/brp-strip-comment-note
/usr/lib/rpm/brp-strip-shared
/usr/lib/rpm/brp-strip-static-archive
/usr/lib/rpm/check-buildroot
/usr/lib/rpm/check-files
/usr/lib/rpm/check-prereqs
/usr/lib/rpm/check-rpaths
/usr/lib/rpm/check-rpaths-worker
/usr/lib/rpm/config.guess
/usr/lib/rpm/config.sub
/usr/lib/rpm/debugedit
/usr/lib/rpm/desktop-file.prov
/usr/lib/rpm/find-debuginfo.sh
/usr/lib/rpm/find-lang.sh
/usr/lib/rpm/find-provides
/usr/lib/rpm/find-requires
/usr/lib/rpm/fontconfig.prov
/usr/lib/rpm/javadeps
/usr/lib/rpm/libtooldeps.sh
/usr/lib/rpm/macros.perl
/usr/lib/rpm/macros.php
/usr/lib/rpm/macros.python
/usr/lib/rpm/mkinstalldirs
/usr/lib/rpm/mono-find-provides
/usr/lib/rpm/mono-find-requires
/usr/lib/rpm/ocaml-find-provides.sh
/usr/lib/rpm/ocaml-find-requires.sh
/usr/lib/rpm/osgideps.pl
/usr/lib/rpm/perl.prov
/usr/lib/rpm/perl.req
/usr/lib/rpm/perldeps.pl
/usr/lib/rpm/pkgconfigdeps.sh
/usr/lib/rpm/pythondeps.sh
/usr/lib/rpm/rpmdeps
/usr/lib/rpm/rpmdiff
/usr/lib/rpm/rpmdiff.cgi
/usr/lib/rpm/tcl.req
/usr/share/man/man1/gendiff.1.gz
/usr/share/man/man8/rpmbuild.8.gz
/usr/share/man/man8/rpmdeps.8.gz
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
wesly_chen

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question