rpmc -qilp postgresql-* > ~/discards/postgresql-all.lst
rpmc -qilp postgresql-* > ~/discards/postgresql-all.lst
rpmf pgaccess ~/discards/postgresql-all.lst cat ~/discards/postgresql-all.lst | rpmf pgaccess rpmc -qail | rpmf sshd.conf
rpm -qp --requires <file.rpm>
If you're unsure if the packages you're adding manually are going to work, you can use it to see if you can resolve them.
rpm -qa --queryformat='%{NAME}\n'
rpmp=ksconfig
$ rpmc -qi $rpmp | sed -n '1p; /^Summary/p' Name : ksconfig Relocations: (not relocateable) Summary : A graphical interface for making kickstart files.
$ rpmc -qi $rpmp | sed -n '1p; /^Summary/,$p' Name : ksconfig Relocations: (not relocateable) Summary : A graphical interface for making kickstart files. Description : This package contains a graphical tool for creating kickstart files. The ksconfig utility will allow you to set most of the kickstart options.
# file listing rpm -ql $rpmp | xargs ls -l # directory listing rpm -ql miniChinput | xargsl1 dirname | sort -u | xargs ls -ld
rpmc -qai | grep -E "^(Name|Summary)$s*:" rpmc -qip x* | grep -E "^(Name|Summary)$s*:" | cut -c15- | sed 's/ *Relocations: .*//'
rpm -qaiRl > ~/discards/rpms.lst
rpm -qpiRl pkg
rpm -qpi mkkickstart-2.1-1.noarch.rpm
rpm -qpR xxxx.rpm
You can swap '-R' with '—requires'
rpm -qpl xxxx.rpm rpm -q -p -i --list xxxx.rpm
rpm -V -p <package>
rpm -qpR <package> rpm -i -vv !$ | tee /tmp/rmp.inst.!$.log
rpm -i --nodeps
— Don't do a dependency check before installing or upgrading!
rpm -U -vv <package> [-f]
rpm -q tcl rpm -qa
rpm -qail | cgreps "^Group$s" printcap
rpm -qp -filesbypkg /mnt/cdrom/RedHat/RPMS/*.rpm | grep libwraster.so.1
which results in:
WindowMaker /usr/X11R6/lib/libwraster.so.1 WindowMaker /usr/X11R6/lib/libwraster.so.1.2.0
rpm -evv emacs-X11-20.5-7 rpm -qa --queryformat='%{NAME}\n' | grep mozilla | xargs rpm -e
ls *.rpm | sed 's/-[0-9][0-9.]*.*$//'
rpmc -qa | grep -- '-devel' | sort > /tmp/rpm-devel.lst.0
rpmc -qa | grep -- '-devel' | xargs -l1 rpm -ev
— repeat several times.
![]() |
!! |
The only two packages that are absolutely necessary are:
glibc-devel is needed by gcc-2.96-98 libstdc++-devel = 2.96 is needed by gcc-c++-2.96-98
QUERY OPTIONS The general form of an rpm query command is
rpm -q [query-options]
-p <package_file> -i Display package information, including name, version, and description. -R, --requires List packages on which this package depends. -l, --list List files in package. --triggerscripts Shows all the trigger scripts for the selected packages.
rpmc -qip x* | grep -E "^(Name|Summary)$s*:" | cut -c15- | sed 's/ *Relocations: .*//'
documented on: 2000.10.23 Mon 21:58:55
>I guess .rpm files are some kind of package files for linux. I >downloaded a source code package (fetchpop-1.9-2.src.rpm). How can I >unpack it and get the sources under Solaries? thanks
There is a rpm2cpio Perl script floating around, works for me but you'll need Perl … you always wanted Perl anyway 8)
Juergen
Source to work with .rpm files is available from: ftp://ftp.redhat.com/pub/redhat/code/rpm (and its myriad mirrors).
Ken Pizzini
documented on: 08-20-99
> > Can somebody tell me how to install RPM > > when I am not root? > > You can't write to /usr/local/bin or /opt/bin or whatever >without being root.
This is true (or least, it should be. If it isn't, your system is broken).
However, the original question was unclear. Is he trying to install RPM or is he trying to install *an* rpm?
If the former, then it is relatively easy to get the sources, compile, and install in his home directory.
If the later, do a web search on "rpm2cpio", which allows you to convert an RPM back into a CPIO file, and then you can what you wish with the CPIO file. Incidentally, I don't think RPM has the ability to install to a subroot (i.e., into a home directory), like Debian's package manager does.
kenny
documented on: 1999.11.12
rpm -ih emacs-21.2-18.src.rpm
or,
apt-get source emacs
cd /usr/src/redhat/
change
%configure --with-gcc --with-pop --with-sound to
%configure --with-gcc --with-pop --without-sound --without-toolkit-scroll-bars
in SPECS/emacs.spec
Increase Release number, so that ours won't get overwritten during apt-get upgrade. E.g, Change "Release: 18" to "Release: 18.1"
Get dependent rpms (XFree86-devel ncurses-devel libpng-devel libjpeg-devel libungif-devel libtiff-devel) and istall them. or better,
apt-get build-dep emacs
Then,
rpmbuild -bb SPECS/emacs.spec
Then,
move out built rpm:
cd ... mv /usr/src/redhat/RPMS/i386/emacs-2*.i386.rpm . rpm -Uh emacs-2*.i386.rpm
rpm -ih emacs-21.2-18.src.rpm
change
%configure --with-gcc --with-pop --with-sound
to
%configure --with-gcc --with-pop --without-toolkit-scroll-bars
in SPECS/emacs.spec
% rpmbuild -bb SPECS/emacs.spec [...] + ./configure --host=i686-pc-linux-gnu --build=i686-pc-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 --with-gcc --with-pop --without-toolkit-scroll-bars [...] Processing files: emacs-leim-21.2-18 [...] Requires: emacs Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/emacs-21.2-root Wrote: /usr/src/redhat/RPMS/i386/emacs-21.2-18.i386.rpm Wrote: /usr/src/redhat/RPMS/i386/emacs-el-21.2-18.i386.rpm Wrote: /usr/src/redhat/RPMS/i386/emacs-leim-21.2-18.i386.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.18929 + umask 022 + cd /usr/src/redhat/BUILD + cd emacs-21.2 /usr/src/redhat/BUILD/emacs-21.2 + rm -rf /var/tmp/emacs-21.2-root + exit 0
-bb Build a binary package (after doing the %prep, %build, and %install stages).
rm -rf /usr/src/redhat/BUILD/emacs-21.2 rm /usr/src/redhat/SPECS/emacs.spec
cd /usr/src/redhat % rpmbuild -bp SPECS/emacs.spec Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.83857 + umask 022 + cd /usr/src/redhat/BUILD + LANG=C + export LANG + cd /usr/src/redhat/BUILD + rm -rf emacs-21.2 + /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/emacs-21.2.tar.bz2 + tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/leim-21.2.tar.bz2 + tar -xf - [...] + echo 'Patch #1 (emacs-21.2-pop.patch):' Patch #1 (emacs-21.2-pop.patch): + patch -p1 -s + exit 0
-bp Executes the "%prep" stage from the spec file. Normally this involves unpacking the sources and applying any patches.
cd BUILD/emacs-21.2 configure --without-toolkit-scroll-bars
— I want standard x-scrollbar behavior
make
src/emacs &
— test run ok
make install
— do it manually! Do NOT use the 'rpmbuild -bi' command:
-bi Do the "%install" stage from the spec file (after doing the %prep and %build stages). This generally involves the equiva- lent of a "make install".
It wipe off all my previously build when I tried!
# Tried to build rpms out of my current build but failed:
% rpmbuild -bb --nobuild SPECS/emacs.spec [...] RPM build errors: Could not open %files file /usr/src/redhat/BUILD/emacs-21.2/core-filelist: No such file or directory Could not open %files file /usr/src/redhat/BUILD/emacs-21.2/el-filelist: No such file or directory Could not open %files file /usr/src/redhat/BUILD/emacs-21.2/leim-filelist: No such file or directory
make uninstall
— very important! It installs emacs to /usr/local/bin/emacs, not the place specified by rpm!
How about I build it first? Will the files be generated then?
cd /usr/src/redhat rpmbuild -bc SPECS/emacs.spec
cd BUILD/emacs-21.2 configure --without-toolkit-scroll-bars # -- I want standard x-scrollbar behavior make
src/emacs & # -- test run ok
cd /usr/src/redhat rpmbuild -bi --nobuild SPECS/emacs.spec [...] RPM build errors: Could not open %files file /usr/src/redhat/BUILD/emacs-21.2/core-filelist: No such file or directory [...]
Seems that I have to do build-install to get those files generate:
rpmbuild -bi SPECS/emacs.spec rpmbuild -bb --nobuild SPECS/emacs.spec # -- no rpms written
Do not use —rebuild or —recompile. When invoked as,
rpmbuild --rebuild|--recompile SOURCEPKG ...
rpmbuild installs the named source package, and does a prep, compile and install.
According to man page, —rebuild builds a new binary package. When the build has completed, the build directory is removed (as in —clean) and the the sources and spec file for the package are removed.
I found that —recompile removes the build directory too! It leaves the spec file though.
% rpmbuild --recompile emacs-21.2-18.src.rpm [...] Wrote: /usr/src/redhat/RPMS/i386/emacs-21.2-18.i386.rpm Wrote: /usr/src/redhat/RPMS/i386/emacs-el-21.2-18.i386.rpm Wrote: /usr/src/redhat/RPMS/i386/emacs-leim-21.2-18.i386.rpm [...] Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.77688 + umask 022 + cd /usr/src/redhat/BUILD + rm -rf emacs-21.2 + exit 0
Newsgroups: comp.os.linux.questions Date: Wed, 20 Nov 2002 18:06:39 GMT
> How can I install a source rpm? > > It is so fustrating! Every web page told me to "rpm --rebuild", like the > following from http://www.rpm.org/max-rpm/s1-rpm-commands-rebuild-mode.html[] > > ,----- > | RPM's rebuild mode is used to rebuild packages from > | a source package file. > | > | Format: rpm --rebuild <options> <source-package> > `----- > > But it simply failed when I tried: > > # /bin/rpm --rebuild kvideogen-1.2-1.src.rpm > --rebuild: unknown option > > $ rpm --query rpm > rpm-4.1-1.06 > > I'm talking about the rpm from RH8. > > What shall I do? Please help.
Use 'rpmbuild —rebuild' instead of 'rpm —rebuild' with RH 8.0. Basically with RH 8.0 you should use 'rpmbuild' for all the building/rebuilding options (—rebuild, —bb, —ba, etc etc), and use 'rpm' for installation-related tasks (-i, -U, -e, etc etc).
Red Hat actually started dividing things up back in the RH 7.x releases, but in those releases the rpm program would just silently go and run rpmbuild for you if you ran 'rpm —rebuild'. With RH 8.0 rpm and rpmbuild are completely independent programs, so you actually have to run the appropriate command.
(BTW, make sure you have the 'rpm-build' RPM installed before trying to use the 'rpmbuild' command. If you installed the "Development Tools" packages in the new RH 8.0 package utility then you should be all set.)
The Maximum RPM guide on rpm.org is a fairly decent reference, but unfortunately it's a couple of years old now and doesn't know about some of the recent changes that've been going on with rpm 4.1.
Brett
Newsgroups: comp.os.linux.misc
> 1) I can't find the answer to a question seems to me very simple: > how to show the info of a un-installed rpm package. > > I tried at least more than 3 times looking into the man page trying > to find the answer and today I have to admit that I can't do > it. This is all that I've tried today: > > 1018 rpm -q mkkickstart-2.1-1.noarch.rpm > 1019 rpm -q --specfile mkkickstart-2.1-1.noarch.rpm > 1020 rpm -q -i mkkickstart-2.1-1.noarch.rpm > 1021 rpm -i mkkickstart-2.1-1.noarch.rpm > 1022 rpm -q -l mkkickstart-2.1-1.noarch.rpm > 1023 rpm --querytags -i mkkickstart-2.1-1.noarch.rpm > 1024 rpm --querytags mkkickstart-2.1-1.noarch.rpm > 1025 rpm -q -i mkkickstart-2.1-1.noarch.rpm > 1026 rpm -q -dump mkkickstart-2.1-1.noarch.rpm > 1027 rpm -dump mkkickstart-2.1-1.noarch.rpm
Add a -p option to any of the normal query options.
> 2) how to list what it depends on and what files it includes?
rpm -qlp <rpm file> rpm -qp --requires <rpm file>
> 3) Isn't the following info given by rpm contradicting? > > [root@host RPMS]# rpm -i mkkickstart-2.1-1.noarch.rpm > package mkkickstart-2.1-1 is already installed > ^^^^^^^^^^^^^^^^^ > [root@host RPMS]# rpm -q mkkickstart-2.1-1.noarch.rpm > package mkkickstart-2.1-1.noarch.rpm is not installed > ^^^^^^^^^^^^^^ > How should we interpret this contradicting info?
A package name in not necessarily related to the filename it was installed from. For example, you could have names the file mkkickstart-2.1-1.noarch.rpm to be gill_bates_sux and it would still be considered as the package mkkickstart-2.1-1. This behaviour gets around the MICROS~1 naming problem we are all familiar with. So basically, during install (or if you use the -p option), you use the filename but all other instances, you use the package name. So if you typed 'rpm -q mkkickstart-2.1-1', it should work. A better thing to type is 'rpm -qa | grep <a pattern>' to allow wildcard searches so you don't miss something.
Prasanth Kumar
|1) I can't find the answer to a question seems to me very simple: |how to show the info of a un-installed rpm package.
rpm -q -i -p mkkickstart-2.1-1.noarch.rpm
|2) how to list what it depends on and what files it includes?
rpm -q -i -R -p xxxx.rpm will list the packages that this one requires (i.e. depends on). You can swap '-R' with '--requires'
rpm -q -i -l -p xxxx.rpm lists all the files. You can also use rpm -q -i --list -p xxxx.rpm
Reverend Paul Colquhoun
]1) I can't find the answer to a question seems to me very simple: ]how to show the info of a un-installed rpm package.
rpm -qilp mkkickstart-2.1-1.noarch.rpm
p says use the package. Without that it will look in its internal database for something called mkkickstart-2.1-1.noarch.rpm and not find it (since it would be called eitehr mkkickstart-2.1-1 or just mkkickstart in that database.)
The -U and -i ( as first item) are the only ones (?) which take the full file name as argument.
]2) how to list what it depends on and what files it includes?
-ql is the file listing.
]3) Isn't the following info given by rpm contradicting?
][root@host RPMS]# rpm -i mkkickstart-2.1-1.noarch.rpm ]package mkkickstart-2.1-1 is already installed ] ^^^^^^^^^^^^^^^^^
No. This says try to install the package stored in the file mkkickstart-2.1-1.noarch.rpm. That package name is mkkickstart-2.1-1 and it is installed.
][root@host RPMS]# rpm -q mkkickstart-2.1-1.noarch.rpm ]package mkkickstart-2.1-1.noarch.rpm is not installed ] ^^^^^^^^^^^^^^
This says look for the package mkkickstart-2.1-1.noarch.rpm and no package with that name exists.
There is a confusion in the documents between the rpm package itself and the file which contains that package (usually ends with .rpm).
Newsgroups: linux.redhat.rpm,alt.os.linux.mandrake,comp.os.linux.misc Date: Mon, 27 Jan 2003 23:33:22 GMT
> > --force and --nodeps rpm options. > > The --nodeps by itself should work. What exact error message are you > getting?
My error is:
error: failed dependencies: TiMidity++ conflicts with kdemultimedia-3.0.5a-1.1mdk
My command line was:
rpm --nodeps --force -vv -U TiMidity++-2.11.3-1mdk_1kc.i586.rpm
I found what works is:
rpm -vv -U --force --nodeps TiMidity++-2.11.3-1mdk.i586.rpm
So the command line options —force and —nodeps are order dependent. I guess that might make sense if one could turn force/deps on and off between package names listed on the command line. But, I don't know of any ways to do that.
Kevin
I always use
rpm -options packagename.rpm --nodeps
which works too.
/g
It's from pkg:kdeadmin
Files also included in the package are:
/usr/bin/kcron /usr/bin/ksysctrl /usr/bin/ksysv /usr/bin/kuser /usr/bin/kwuftpd /usr/bin/printversion /usr/bin/secpolicy
documented on: 2000.12.15
Rpmfind will query the local RPM database, or will request the associated RDF file for a program on a remote database, for information on a specified program. Specifically, rpmfind will tell you what packages are needed to install the program to satisfy all dependencies and the size of the packages (so you can estimate download time). Rpmfind can then even download the packages for you.
Rpmfind can also be used to query the RPM database for existing packages using a keyword or a regular expression.
http://rpmfind.net/linux/rpm2html/rpmfind.html ftp://rpmfind.net/pub/rpmfind/rpmfind-rh6-1.2-1.i386.rpm
Do you want to search it in the catalog? [Y/n] : y
— have to explicitly answer y
-q produce more noise. :-(
'a specific "upgrade" mode exists to check for replacement of older packages. It also walks down the dependency lists and also suggest upgrades for them'
never works for me:
rpmfind -q --latest wine rpmfind --latest wine
rpmfind -q --upgrade --dist asp wine rpmfind --upgrade --dist asp wine
X rpmfind -$ rpmfind -q --latest wine
rpmfind --upgrade --dist asp-linux wine rpmfind --upgrade --dist asplinux wine rpmfind --upgrade --dist SWsoft wine
It always stupidly insists on installing the RH7.1's version. If I answer no, the program just stupidly quit
This mode is used to find packages related to a given topic defined by a keyword of a regex. The syntax is rpmfind —apropos regex and will query the full set of RPM indexed on rpmfind.net for package name and summary descriptions.
For example I have heard about a Borland like programming environment, let' learn about it:
$ rpmfind --apropos borland 1: ftp://rpmfind.net/linux/contrib/i386/rhide-1.3-1.i386.rpm rhide : Rhide is a very nice IDE exactly like Borland's $
In that case the query found only one package, all the package containing the substring in their name or summary will be shown.
This is the "default" mode of rpmfind where you know the name of the package you want to install and rpmfind will locate the "best" package accordingly to your installed distribution, and show also all the other packages needed to solve the dependancies needed.
For example let's install xbill game on the machine:
$ rpmfind xbill
ftp://rpmfind.net/pub/rpmfind/rpmfind-1.6-1.i386.rpm From Stuff on Rufus.W3.Org
rpm -ivv ~/dl/mustH_b/inet/agent/rpmfind-1.6-1.i386.rpm
$ rpmfind --latest wine Arch : i386, Os : Linux Default distribution : Red Hat, Inc.(BlueSky) owning 380 of 461 installed packages Cannot install or locate resource wine Do you want to search it in the catalog? [Y/n] : y 1: ftp://ftp.asp-linux.com/pub//i386/RPMS.rc3/wine-devel-20000725-2.i386.rpm wine-devel : Wine development environment.
2: ftp://ftp.asp-linux.com/pub//i386/RPMS.rc3/wine-20000725-2.i386.rpm wine : A Windows 16/32 bit emulator.
3: ftp://ftp.asp-linux.com/pub//blackcat-linux/6.2/tools/SRPMS/wine-20000213-1.src.rpm wine : A Windows 16/32 bit emulator. 4: ftp://ftp.redhat.com/pub/redhat/linux/6.1/en/powertools/i386/SRPMS//wine-990704-1.src.rpm wine : A Windows 16/32 bit emulator.
from RPM.Org
rpm -ivv ~/s/myin/rpmfind-1.6-6.i386.rpm
error: failed dependencies: libbz2.so.1 is needed by rpmfind-1.6-6 libdb-3.1.so is needed by rpmfind-1.6-6 librpmdb.so.0 is needed by rpmfind-1.6-6 librpmio.so.0 is needed by rpmfind-1.6-6
Newsgroups: comp.os.linux.setup
> From time to time, I need to install a service that I don't have on a >particular machine. (In this case in.inetd) I know that it is what >provides the AUTH function. What technique do I employ to determine >which rpm to install it from. (RedHat) Is their an rpm command that >will query the database and report, something like: >'in.inetd is provided by auth1.2-3.4-i386.rpm' etc?
the quickest way to find specific rpm's is to use the rpmfind database at http://rufus.w3.org . You can either install the rpmfind package on your own machine or use their webbased search engine.
Herman
documented on: 2001.07.04
Newsgroups: comp.os.linux.misc
>Hi. How do I find out which package provides the >missing libwraster.so.1? > >(I can't see how the --whatprovides stuff works.)
Try this (assuming a Red Hat install CD in your drive... adjust path for others):
$ rpm -qp -filesbypkg /mnt/cdrom/RedHat/RPMS/*.rpm | grep libwraster.so.1
which results in:
WindowMaker /usr/X11R6/lib/libwraster.so.1 WindowMaker /usr/X11R6/lib/libwraster.so.1.2.0
Steve Ackman
Newsgroups: comp.os.linux.misc
>I did a rpm -ihv <package>, and it gave me this error: > >only packages with major numbers <= 3 are supported by this version of >RPM
This is a guess but Red Hat has produced a new version or RPM, version 4. I know the new RPM database is different so maybe the package files are also. Could RPMs be for the new package manager?
Jeff S.
Alien converts between the rpm, deb, Stampede slp, and Slackware tgz file formats. If you want to use a package from another distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it.
Homepage: http://kitenet.net/programs/alien/ Tar/GZ: http://kitenet.net/programs/code/alien/alien.tar.gz Changelog: http://kitenet.net/programs/alien/CHANGES RPM package: http://kitenet.net/programs/RPMS.cgi#alien Debian package: http://kitenet.net/programs/debs.cgi#alien
Trove categories: Development Status :: 6 - Mature Environment :: Console (Text Based) Intended Audience :: System Administrators License :: OSI Approved :: GNU General Public License (GPL) Old Appindex :: Console :: Packaging