LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-19-2002, 10:06 PM   #1
asimpeter
LQ Newbie
 
Registered: Nov 2002
Posts: 9

Rep: Reputation: 0
How to install src.rpm package on Red hat Linux?


Can any one please help me how to install src.rpm package on Red hat Linux? Which commands will work for me in this regard?
Thanks
peter
 
Old 12-19-2002, 10:18 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
RedHat usually stores source rpms in /usr/src/redhat/SRPMS

you can put them anywhere you want though
to build it run this..

Code:
 rpm --rebuild filename.src.rpm
the rebuilt rpm will be put in /usr/src/redhat/RPM/
you can install it like this

Code:
cd /usr/src/redhat/RPM/

rpm -iv filename.rpm
 
Old 12-19-2002, 10:50 PM   #3
asimpeter
LQ Newbie
 
Registered: Nov 2002
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks David for your reply. I've checked your suggested commands but after

> rpm --rebuild ethereal-0.9.8-1.7.2.src.rpm

it gives the following error:

configure: error: UCD SNMP header files found, but sprint_realloc_objid not found in SNMP library.
error: bad exist status from /var/tmp/rpm-tmp.47473(% build)


RPM build errors:
Bad exist status from /var/tmp/rpm-tmp.47473(% build)

Please guide me how to get rid of these errors.
Thanks
peter
 
Old 12-19-2002, 11:57 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
it probably needs something you don't have on the system

where did you get the rpm file? You should go to redhat.com and get the right rpm for your distro, or go to rpmfind.net and get the dependencies.
 
Old 04-05-2008, 09:54 PM   #5
natv
Member
 
Registered: Mar 2006
Posts: 66

Rep: Reputation: 15
Hi

I'm running CentOS 2.6.9-55.0.9.EL

and trying to install an RPM that I only have the src.rpm file for.

I'm following the steps above, but my system is telling me that --rebuild is not a valid option:



[root@minime install]# ls -al rpmfind-1.7-4.9.src.rpm
-rw-r--r-- 1 root root 122245 Apr 5 22:43 rpmfind-1.7-4.9.src.rpm

[root@minime install]# rpm --rebuild rpmfind-1.7-4.9.src.rpm
--rebuild: unknown option



Is there an alternative to the --rebuild command? I checked 'man rpm' and couldn't find anything relating to this.

I'm running version:

[root@minime install]# rpm --version
RPM version 4.3.3




Thanks in advance,
Nathalie
 
Old 04-05-2008, 09:58 PM   #6
natv
Member
 
Registered: Mar 2006
Posts: 66

Rep: Reputation: 15
Hmm, I thought I had it figured out, I tried the command:

rpmbuild --rebuild rpmfind-1.7-4.9.src.rpm



It seemed to be working but then at the end I ran into an error:



[root@minime install]# rpmbuild --rebuild rpmfind-1.7-4.9.src.rpm
Installing rpmfind-1.7-4.9.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.98074
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf rpmfind-1.7
+ /bin/gzip -dc /usr/src/redhat/SOURCES/rpmfind-1.7.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd rpmfind-1.7
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch #0 (rpmfind.libxml2.patch):'
Patch #0 (rpmfind.libxml2.patch):
+ patch -p0 -s
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.88716
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd rpmfind-1.7
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS='-O2 -g -pipe -m32 -march=i386 -mtune=pentium4'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -m32 -march=i386 -mtune=pentium4'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -m32 -march=i386 -mtune=pentium4'
+ export FFLAGS
++ find . -name config.guess -o -name config.sub
+ for i in '$(find . -name config.guess -o -name config.sub)'
++ basename ./config.guess
+ '[' -f /usr/lib/rpm/redhat/config.guess ']'
+ /bin/rm -f ./config.guess
++ basename ./config.guess
+ /bin/cp -fv /usr/lib/rpm/redhat/config.guess ./config.guess
`/usr/lib/rpm/redhat/config.guess' -> `./config.guess'
+ for i in '$(find . -name config.guess -o -name config.sub)'
++ basename ./config.sub
+ '[' -f /usr/lib/rpm/redhat/config.sub ']'
+ /bin/rm -f ./config.sub
++ basename ./config.sub
+ /bin/cp -fv /usr/lib/rpm/redhat/config.sub ./config.sub
`/usr/lib/rpm/redhat/config.sub' -> `./config.sub'
+ ./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info
creating cache ./config.cache
checking host system type... i686-redhat-linux-gnu
checking target system type... i386-redhat-linux-gnu
checking build system type... i686-redhat-linux-gnu
checking whether make sets ${MAKE}... yes
checking for gcc... gcc
checking whether the C compiler (gcc -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 ) works... yes
checking whether the C compiler (gcc -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether ln -s works... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for rm... /bin/rm
checking for mv... /bin/mv
checking for tar... /bin/tar
checking for gzip... /bin/gzip
checking for xml2-config... xml2-config
checking for deflate in -lz... yes
checking for bzread in -lbz2... no
checking for BZ2_bzread in -lbz2... yes
checking for gettext in -lintl... no
checking for dbopen... no
checking for db_create in -ldb-3.1... no
checking for db_create in -ldb-3.0... no
checking for dbopen in -ldb1... no
checking for dbopen in -ldb... no
configure: error: *** db lib not found
error: Bad exit status from /var/tmp/rpm-tmp.88716 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.88716 (%build)
[root@minime install]#






Am I using the correct command and is there just a problem with this source file?

Or is this not the correct way to install from a src.rpm file?



Thanks
 
Old 01-12-2009, 12:32 AM   #7
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466
Blog Entries: 6

Rep: Reputation: 51
[root@bl tmp]# rpm --rebuild php-5.1.4-1.esp1.src.rpm
--rebuild: unknown option
Any idea what package I need for the command to work?
 
Old 09-17-2011, 03:57 AM   #8
dann_radkov
Member
 
Registered: Sep 2011
Posts: 52

Rep: Reputation: Disabled
--rebuild: unknown option I dont think this seems to be a valid option since I cannot deploy it neither on my RHEL nor on the SUSE.Please try to check before posting stuff like this.
 
0 members found this post helpful.
Old 09-17-2011, 04:26 AM   #9
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by dann_radkov View Post
--rebuild: unknown option I dont think this seems to be a valid option since I cannot deploy it neither on my RHEL nor on the SUSE.Please try to check before posting stuff like this.
Please don't drag up old threads like this.
 
Old 09-17-2011, 05:11 AM   #10
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
HI
mkdir -p /usr/src/redhat/
cd /src/redhat
rpm -ivh ethereal-0.9.8-1.7.2.src.rpm
 
Old 09-21-2011, 09:57 AM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Cool

Still works the same on my rh linux box. Some things have changed quite a bit. Once you found the right command to use you are still dealing with the same old dependency errors.


To clarify this it works on rhl prior to 8.0. After that it was removed completely. Rpmbuild was added back around 7.x and rpm --rebuild was depreciated.


Last edited by DavidPhillips; 09-21-2011 at 10:10 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox 0.9.1/0.9.2 rpm package for Red Hat 9.0 ? southpole.dk Linux - Software 2 07-16-2004 09:10 AM
package install failed when asking for red hat linux CD 3 mcsfo2000 Linux - Newbie 1 05-25-2004 08:18 AM
Can Red Hat Package Upgrades be done from Install CD? LinuxBlackBox Linux - Software 2 11-12-2003 06:30 AM
red hat 9 apt-rpm package manager ronss Red Hat 3 09-25-2003 03:29 PM
linux-2.4.20-9.src.rpm seems to install, but where?? Pcghost Linux - Software 6 04-10-2003 10:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration