LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to install src.rpm package on Red hat Linux? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-src-rpm-package-on-red-hat-linux-38928/)

asimpeter 12-19-2002 10:06 PM

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

DavidPhillips 12-19-2002 10:18 PM

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


asimpeter 12-19-2002 10:50 PM

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

DavidPhillips 12-19-2002 11:57 PM

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.

natv 04-05-2008 09:54 PM

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

natv 04-05-2008 09:58 PM

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

your_shadow03 01-12-2009 12:32 AM

[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?

dann_radkov 09-17-2011 03:57 AM

--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.

Nylex 09-17-2011 04:26 AM

Quote:

Originally Posted by dann_radkov (Post 4474264)
--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.

jsaravana87 09-17-2011 05:11 AM

HI
mkdir -p /usr/src/redhat/
cd /src/redhat
rpm -ivh ethereal-0.9.8-1.7.2.src.rpm

DavidPhillips 09-21-2011 09:57 AM

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.

;)


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