Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-24-2010, 03:28 PM   #1
Registered: Nov 2003
Posts: 79

Rep: Reputation: 15
Question How to compile .src to .rpm on Redhat 5?

Dear Experts,

I'm struggling with an Oracle install on top
of the Redhat 5 os.

The solution I'm getting to some errors is to
download an .rpm file and run some fancy commands.

cat compat-db-4.1.25-9.i386.rpm | rpm2cpio | pax -r

I've managed to find a .src.rpm file.

From the .src, I want to create the .rpm file.
But NOT install it.
Since that would conflict with the newer version
of the same package that is already installed.

Linux occassionally change things with different releases.

My old notes say, to compile the .src file, use:

rpm --rebuild util-linux-2.11y-9.src.rpm

My questions are:

1) Is this syntax still correct on Redhat 5?
If not, what is the new correct syntax?
Perhaps use: rpmbuild?

2) If I run this command, does it create a .rpm file?
or, does it install it onto the system.

3) If that command would install the .src,
what is the correct syntax to create the .rpm ONLY?

Sorry for the seemingly dumb questions.
I don't want to just try this, and affect this install.

Thanks a lot!
Old 01-24-2010, 05:20 PM   #2
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650

'rpmbuild --rebuild xxx' is the correct command, it will only create a new rpm not install it.

Is your machine set up to build rpm's ? (rpm -qi rpm-build)

BTW... there's no such thing as a dumb question, if you don't ask questions you'll never learn (people always told me I asked too many questions )

Old 01-24-2010, 07:00 PM   #3
Registered: Nov 2003
Posts: 79

Original Poster
Rep: Reputation: 15
Thanks. This what I get.

rpm -qi rpm-build

Name : rpm-build Relocations: (not relocatable)
Version : 4.4.2 Vendor: Oracle USA
Release : 48.el5.0.1 Build Date: Wed 19 Mar 2008 05:03:46 PM CDT
Install Date: Sat 16 Jan 2010 07:50:19 AM CST Build Host:
Group : Development/Tools Source RPM: rpm-4.4.2-48.el5.0.1.src.rpm
Size : 2098087 License: GPL
Signature : DSA/SHA1, Fri 21 Mar 2008 07:24:56 PM CDT, Key ID 66ced3de1e5e0159
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.

I'd actually tried that.
Now I get another error. Sigh.
I'll make another post.

rpmbuild --rebuild compat-db-4.1.25-9.src.rpm

./libtool: line 1015: -e: command not found
./libtool: line 1015: -e: command not found
./libtool: line 1015: -e: command not found
./libtool: line 1015: -e: command not found
./libtool: line 1043: -e: command not found
./libtool: line 1067: -e: command not found
: compile: cannot determine name of library object from `'
make: *** [mut_pthread.lo] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.61332 (%build)

RPM build errors:
InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID db42a60e
Bad exit status from /var/tmp/rpm-tmp.61332 (%build)
Old 01-24-2010, 07:13 PM   #4
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
You'll need to have all the dependencies installed before rebuilding it

<edit>To clarify: rpms will have 'build dependencies' and 'runtime dependencies' - you'll need the build dependencies (usually -devel packages)


Last edited by kbp; 01-24-2010 at 07:16 PM.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
rpmdb-redhat-4-0.20050525.src.rpm/rebuild error louisb Linux - Enterprise 0 07-12-2005 10:19 AM
how do I compile or build a src.rpm driver? Falafel Linux - Software 1 11-19-2003 06:40 AM
How do I statically compile a src.rpm? WeNdeL Linux - General 1 05-19-2003 10:32 AM
RedHat and src.rpm build of MySQL wdingus Linux - Software 3 04-15-2003 05:23 PM
Creating /usr/src/linux-<xx> from kernel.<xx>.src.rpm jmourik Linux - Newbie 2 02-19-2003 03:24 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:23 PM.

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