LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-08-2007, 12:43 PM   #1
defa0009
Member
 
Registered: Jun 2003
Posts: 185

Rep: Reputation: 31
Can't rebuild RPM - rpmbuild command not found


I can't seem to rebuild a RPM because rpm-build is not installed. And I can't use "yum install rpm-build" because I need to rebuild my Yum.src.rpm in order to get it to work with my version of Python.

Anyone know how I can:

a) get a version of rpm that has the rebuild option?

or

b) rebuild a src.rpm without having rpmbuild?


[root@RedhatRick Desktop]# rpmbuild --rebuild yum-3.2.8-1.src.rpm
bash: rpmbuild: command not found


My version of rpm is:


rpm-4.4.2-37.el5


And there is no rebuild option in the list for this version installed


[root@RedhatRick yum-3.2.8]# rpm --help
Usage: rpm [OPTION...]

Query options (with -q or --query):
-c, --configfiles list all configuration files
-d, --docfiles list all documentation files
--dump dump basic file information
-l, --list list files in package
--queryformat=QUERYFORMAT use the following query format
-s, --state display the states of the listed files
-a, --all query/verify all packages
-f, --file query/verify package(s) owning file
-g, --group query/verify package(s) in group
-p, --package query/verify a package file
-W, --ftswalk query/verify package(s) from TOP file tree
walk
--pkgid query/verify package(s) with package
identifier
--hdrid query/verify package(s) with header
identifier
--fileid query/verify package(s) with file identifier
--specfile query a spec file
--triggeredby query the package(s) triggered by the
package
--whatrequires query/verify the package(s) which require a
dependency
--whatprovides query/verify the package(s) which provide a
dependency
--nomanifest do not process non-package files as
manifests

Verify options (with -V or --verify):
--nomd5 don't verify MD5 digest of files
--nofiles don't verify files in package
--nodeps don't verify package dependencies
--noscript don't execute verify script(s)
-a, --all query/verify all packages
-f, --file query/verify package(s) owning file
-g, --group query/verify package(s) in group
-p, --package query/verify a package file
-W, --ftswalk query/verify package(s) from TOP file tree
walk
--pkgid query/verify package(s) with package
identifier
--hdrid query/verify package(s) with header
identifier
--fileid query/verify package(s) with file identifier
--specfile query a spec file
--triggeredby query the package(s) triggered by the
package
--whatrequires query/verify the package(s) which require a
dependency
--whatprovides query/verify the package(s) which provide a
dependency
--nomanifest do not process non-package files as
manifests

File tree walk options (with --ftswalk):
--comfollow FTS_COMFOLLOW: follow command line symlinks
--logical FTS_LOGICAL: logical walk
--nochdir FTS_NOCHDIR: don't change directories
--nostat FTS_NOSTAT: don't get stat info
--physical FTS_PHYSICAL: physical walk
--seedot FTS_SEEDOT: return dot and dot-dot
--xdev FTS_XDEV: don't cross devices
--whiteout FTS_WHITEOUT: return whiteout information

Signature options:
--addsign sign package(s) (identical to --resign)
-K, --checksig verify package signature(s)
--delsign delete package signatures
--import import an armored public key
--resign sign package(s) (identical to --addsign)
--nodigest don't verify package digest(s)
--nosignature don't verify package signature(s)

Database options:
--initdb initialize database
--rebuilddb rebuild database inverted lists from
installed package headers

Install/Upgrade/Erase options:
--aid add suggested packages to transaction
--allfiles install all files, even configurations
which might otherwise be skipped
--allmatches remove all packages which match <package>
(normally an error is generated if
<package> specified multiple packages)
--badreloc relocate files in non-relocatable package
-e, --erase=<package>+ erase (uninstall) package
--excludedocs do not install documentation
--excludepath=<path> skip files with leading component <path>
--fileconflicts detect file conflicts between packages
--force short hand for --replacepkgs --replacefiles
-F, --freshen=<packagefile>+ upgrade package(s) if already installed
-h, --hash print hash marks as package installs (good
with -v)
--ignorearch don't verify package architecture
--ignoreos don't verify package operating system
--ignoresize don't check disk space before installing
-i, --install install package(s)
--justdb update the database, but do not modify the
filesystem
--nodeps do not verify package dependencies
--nomd5 don't verify MD5 digest of files
--nocontexts don't install file security contexts
--noorder do not reorder package installation to
satisfy dependencies
--nosuggest do not suggest missing dependency
resolution(s)
--noscripts do not execute package scriptlet(s)
--notriggers do not execute any scriptlet(s) triggered
by this package
--oldpackage upgrade to an old version of the package
(--force on upgrades does this
automatically)
--percent print percentages as package installs
--prefix=<dir> relocate the package to <dir>, if
relocatable
--relocate=<old>=<new> relocate files from path <old> to <new>
--repackage save erased package files by repackaging
--replacefiles ignore file conflicts between packages
--replacepkgs reinstall if the package is already present
--test don't install, but tell if it would work or
not
-U, --upgrade=<packagefile>+ upgrade package(s)

Common options for all rpm modes and executables:
-D, --define='MACRO EXPR' define MACRO with value EXPR
-E, --eval='EXPR' print macro expansion of EXPR
--macros=<FILE:...> read <FILE:...> instead of default file(s)
--nodigest don't verify package digest(s)
--nosignature don't verify package signature(s)
--rcfile=<FILE:...> read <FILE:...> instead of default file(s)
-r, --root=ROOT use ROOT as top level directory (default:
"/")
--querytags display known query tags
--showrc display final rpmrc and macro configuration
--quiet provide less detailed output
-v, --verbose provide more detailed output
--version print the version of rpm being used

Options implemented via popt alias/exec:
--scripts list install/erase scriptlets from
package(s)
--setperms set permissions of files in a package
--setugids set user/group ownership of files in a
package
--conflicts list capabilities this package conflicts
with
--obsoletes list other packages removed by installing
this package
--provides list capabilities that this package provides
--requires list capabilities required by package(s)
--info list descriptive information from package(s)
--changelog list change logs for this package
--xml list metadata in xml
--triggers list trigger scriptlets from package(s)
--last list package(s) by install time, most
recent first
--filesbypkg list all files from each package
--fileclass list file names with classes
--filecolor list file names with colors
--filecontext list file names with security context from
header
--fscontext list file names with security context from
file system
--recontext list file names with security context from
policy RE
--fileprovide list file names with provides
--filerequire list file names with requires
--redhatprovides find package name that contains a provided
capability (needs rpmdb-redhat package
installed)
--redhatrequires find package name that contains a required
capability (needs rpmdb-redhat package
installed)
--buildpolicy=<policy> set buildroot <policy> (e.g. compress man
pages)
--with=<option> enable configure <option> for build
--without=<option> disable configure <option> for build

Help options:
-?, --help Show this help message
--usage Display brief usage message
 
Old 12-08-2007, 01:31 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Get a binary rpm-build RPM. Usually you could use yum to do this, but since yours is borked you'll need to download one directly from a repo for your distribution.
 
Old 12-08-2007, 01:32 PM   #3
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Nothing is stopping you from manually downloading the rpm package from RHN and installing it;

http://www.redhat.com/rhn/
rpm -Uvh rpm-build*.rpm

Noting is stopping also from installing the rpm-build rpm package from the media either.
 
Old 12-08-2007, 02:06 PM   #4
defa0009
Member
 
Registered: Jun 2003
Posts: 185

Original Poster
Rep: Reputation: 31
The only rpm-build version I can find is not the same version as my rpm (rpm-4.4.2-37.el5) so it complains when I try to install it.
 
Old 12-08-2007, 02:27 PM   #5
defa0009
Member
 
Registered: Jun 2003
Posts: 185

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Lenard View Post
Nothing is stopping also from installing the rpm-build rpm package from the media either.
Can't do that either because my optical drive is not being recognized... that's another thread in it's own.
 
Old 12-08-2007, 02:33 PM   #6
defa0009
Member
 
Registered: Jun 2003
Posts: 185

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by defa0009 View Post
The only rpm-build version I can find is not the same version as my rpm (rpm-4.4.2-37.el5) so it complains when I try to install it.
I finally found the right version... now it complains that it needs elsutils:

[root@RedhatRick Desktop]# rpm -Uvh rpm-build-4.4.2-37.el5.i386.rpm
error: Failed dependencies:
elfutils is needed by rpm-build-4.4.2-37.el5.i386


After installing about 8 other dependencies I finally got rpm-build installed...

Last edited by defa0009; 12-08-2007 at 02:55 PM.
 
Old 12-08-2007, 02:54 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Well, then you're going to have to get the elfutils RPM ... BTW, how did you manage to break your yum? Having yum would make this a lot easier. This is why if I need to install a newer python on a Red Hat distro I install it out of the way (/opt or /usr/local) so I don't overwrite the system python. So much stuff in Red Hat distros is python based you really do need to keep the opriginal python around...
 
Old 12-08-2007, 03:03 PM   #8
defa0009
Member
 
Registered: Jun 2003
Posts: 185

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by btmiller View Post
BTW, how did you manage to break your yum?
Yum was never installed...
 
Old 12-08-2007, 07:31 PM   #9
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Yum is the default and preferred update tool used by Red Hat for Enterprise Linux 5 and is installed by default. Once again it is available from RHN and/or the installation media.
 
Old 12-09-2007, 12:07 PM   #10
defa0009
Member
 
Registered: Jun 2003
Posts: 185

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Lenard View Post
Once again it is available from RHN and/or the installation media.
I shouldn't say yum wasn't installed... it never worked. Used to complain about a missing module 'cElementTree' from Python.

So I read somewhere that to get yum running with this type of error I should rebuild it from src.rpm hence the need for rebuild. And that actually did not work. So then I searched for the python-elementtree rpm and installed it and yum started working.

So to make a long story short I could have fixed yum first then I could have just did a yum install rpm-rebuild instead of taking the long way around with all the other dependencies to get rpm-rebuild working.

Quote:
Originally Posted by Lenard View Post
Once again it is available from RHN and/or the installation media.
My optical drive is not being recognized, probably a bios issue because on boot I get this error saying the DVD drive is the parallel master and then I have to hit the F1 key to continue booting.
 
Old 12-09-2007, 12:35 PM   #11
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Quote:
cElementTree' from Python.
Is also available from the media and RHN, as python-elementtree-1.2.6-5.x86_64.rpm for example.

Quote:
My optical drive is not being recognized, probably a bios issue because on boot I get this error saying the DVD drive is the parallel master and then I have to hit the F1 key to continue booting.
Bummer, check with your system/motherboard manufacturer maybe they have a fix (BIOS update) or a workaround for this issue. One can (as a suggestion) create a local repo by using the createrepo package as a workaround also;

http://dag.wieers.com/rpm/FAQ.php#B
http://dag.wieers.com/rpm/packages/createrepo/

This does take space and will require getting the ISO image(s) on the system so one can mount the ISO image(s) and copy the rpm files to a common location (say for example /RHEL5). This will eliminate the need for the media. Sample local-Media.repo file that goes into the /etc/yum.repos.d directory;

Code:
[local-media]
name=Red Hat-$releasever - Media
baseurl=file:///RHEL5
gpgcheck=0
enabled=0
Then all one needs to type is something like: yum install foo --enablerepo=local-media

To create the local repo from the directory /RHEL5 type: createrepo /RHEL5
 
Old 12-10-2007, 07:35 AM   #12
defa0009
Member
 
Registered: Jun 2003
Posts: 185

Original Poster
Rep: Reputation: 31
Thanks for the info Lenard... maybe someone can help me with this new problem:

I had a mishap last night after re-booting the machine for the first time since applying some more
dependencies (ie. yum install kernel) for VMware Server (the link below). My machine doesn't boot
into my Desktop anymore. I just get a command line login. I then try a startx and only one screen
comes on when I used to have 2 screens. Also when I open a terminal window it says 'bash#'
when it used to have [root@RedhatRick Desktop]#

http://www.linuxquestions.org/questi...089/page2.html
 
  


Reply


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
rpm rebuild and locate command Xris718 Linux - General 2 05-05-2005 11:25 AM
rpmbuild: command not found ltt19 Linux - Software 7 11-28-2004 01:34 PM
rpmbuild --rebuild qmail-1.03 gets error aggiesoft Red Hat 0 03-02-2004 02:14 PM
rpmbuild: command not found zebra5 Linux - Software 3 10-08-2003 03:31 PM
rpmbuild-command not found arnold_it Linux - Software 4 08-11-2003 09:54 AM

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

All times are GMT -5. The time now is 10:19 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