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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-08-2007, 12:43 PM
|
#1
|
Member
Registered: Jun 2003
Posts: 185
Rep:
|
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
|
|
|
12-08-2007, 01:31 PM
|
#2
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
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.
|
|
|
12-08-2007, 01:32 PM
|
#3
|
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:
|
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.
|
|
|
12-08-2007, 02:06 PM
|
#4
|
Member
Registered: Jun 2003
Posts: 185
Original Poster
Rep:
|
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.
|
|
|
12-08-2007, 02:27 PM
|
#5
|
Member
Registered: Jun 2003
Posts: 185
Original Poster
Rep:
|
Quote:
Originally Posted by Lenard
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.
|
|
|
12-08-2007, 02:33 PM
|
#6
|
Member
Registered: Jun 2003
Posts: 185
Original Poster
Rep:
|
Quote:
Originally Posted by defa0009
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.
|
|
|
12-08-2007, 02:54 PM
|
#7
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
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...
|
|
|
12-08-2007, 03:03 PM
|
#8
|
Member
Registered: Jun 2003
Posts: 185
Original Poster
Rep:
|
Quote:
Originally Posted by btmiller
BTW, how did you manage to break your yum?
|
Yum was never installed...
|
|
|
12-08-2007, 07:31 PM
|
#9
|
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:
|
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.
|
|
|
12-09-2007, 12:07 PM
|
#10
|
Member
Registered: Jun 2003
Posts: 185
Original Poster
Rep:
|
Quote:
Originally Posted by Lenard
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
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.
|
|
|
12-09-2007, 12:35 PM
|
#11
|
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:
|
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
|
|
|
12-10-2007, 07:35 AM
|
#12
|
Member
Registered: Jun 2003
Posts: 185
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 10:19 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
|
|