rpm install src

lolaferrari
lolaferrari used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
try
 rpm --rebuild tcpdump-4.0.0-3.20090921gitdf3cb4.1.el6.src.rpm
and then
rpm -ivh /usr/src/redhat/RPMS/tcpdump.version.rpm

Author

Commented:
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):
Top Expert 2011

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

Make sure rpm-build is installed.
yum install rpm-build
Acronis in Gartner 2019 MQ for datacenter backup

It is an honor to be featured in Gartner 2019 Magic Quadrant for Datacenter Backup and Recovery Solutions. Gartner’s MQ sets a high standard and earning a place on their grid is a great affirmation that Acronis is delivering on our mission to protect all data, apps, and systems.

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
Argh! Sorry again. didnt mean to post twice..
:)

Author

Commented:
[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.

Author

Commented:
[root@testbox ~]# rpm -qa | grep rpm-build
rpm-build-4.8.0-12.el6.i686
Top Expert 2011

Commented:
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)

Author

Commented:
[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
Top Expert 2011
Commented:

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial