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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-19-2002, 10:06 PM
|
#1
|
|
LQ Newbie
Registered: Nov 2002
Posts: 9
Rep:
|
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
|
|
|
|
12-19-2002, 10:18 PM
|
#2
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
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
|
|
|
|
12-19-2002, 10:50 PM
|
#3
|
|
LQ Newbie
Registered: Nov 2002
Posts: 9
Original Poster
Rep:
|
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
|
|
|
|
12-19-2002, 11:57 PM
|
#4
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
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.
|
|
|
|
04-05-2008, 09:54 PM
|
#5
|
|
Member
Registered: Mar 2006
Posts: 59
Rep:
|
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
|
|
|
|
04-05-2008, 09:58 PM
|
#6
|
|
Member
Registered: Mar 2006
Posts: 59
Rep:
|
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
|
|
|
|
01-12-2009, 12:32 AM
|
#7
|
|
Senior Member
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,411
Rep:
|
[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?
|
|
|
|
09-17-2011, 03:57 AM
|
#8
|
|
Member
Registered: Sep 2011
Posts: 52
Rep: 
|
--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.
|
09-17-2011, 04:26 AM
|
#9
|
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,466
Rep: 
|
Quote:
Originally Posted by dann_radkov
--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.
|
|
|
|
09-17-2011, 05:11 AM
|
#10
|
|
Member
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 527
Rep: 
|
HI
mkdir -p /usr/src/redhat/
cd /src/redhat
rpm -ivh ethereal-0.9.8-1.7.2.src.rpm
|
|
|
|
09-21-2011, 09:57 AM
|
#11
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:53 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|