New answers tagged rpm
1
From the RPM Guide:
Defining installation scripts:
RPM supports a script run prior to installation, %pre, and a script
run after installation, %post. The same concepts apply when a package
is erased, or uninstalled. The %preun script is run just before the
uninstall and the %postun script just after the uninstal
So, use the %pre section if you ...
1
Commands run before package install are placed in the %pre section. Commands run after package install are placed in the %post section.
0
--last won't tell you the highest version number but it will order by date of installation. So you can see the most recently installed version:
[root@xms_apps ~]# rpm -qa kernel-xen --last
kernel-xen-2.6.18-348.1.1.el5 Tue 29 Jan 2013 02:18:52 PM EST
kernel-xen-2.6.18-308.11.1.el5 Fri 20 Jul 2012 04:00:26 PM EDT
...
1
You really need to use the RPM library to get a good result. The version comparison algorithm is... decidedly complex. It's non-trivial to reimplement in shell, but if you can use Python to do the actual comparison, it becomes relatively straightforward. See http://stackoverflow.com/questions/3206319/how-do-i-compare-rpm-versions-in-python for an exmaple of ...
0
TL;DR
The 3rd attempt actually works! I'm leaving the first 2 attempts so that others that may come across this Q&A in the future will hopefully gain some insight into how non-trivial a problem it is to parse RPM version information and determine the lineage of which came first, second, etc.
Attempt #1 (OP said didn't work)
This command will sort the ...
3
This kind of error messages can appear if you try to install a package whose previous installation got aborted without completing.
rpm by default won't install a package if any of the file it needs to install already exists in the filesystem. So, if a previous installation aborted and some files were left behind, all succesive attempt will fail. The error ...
0
I partially solved this I mean at least the "what can be done about it" part I ran:
rpm -i --force fillup-1.42-268.1.x86_64.rpm
and it works now but still don't know why that error message happened.
1
As several responders said, it is not so much that a certain package format is clearly superior. Technically, they may be more or less comparable. From my perspective a lot of the differences, and why people prefer one over the other, have to do with:
The philosophy of the original package design and the target audience
The community size, and by ...
4
RPM has no concept of "suggested" packages, like DEB has. I've been involved in discussions about this, and the conclusion was that it just doesn't make much sense. "Suggested" for what use? "Suggested" can go from "You might want to look into this too" to "Very unlikely to be of any use without..." Why would you want to need the suggestion? Either it is ...
0
Is there a specific header file, e.g. /usr/include/X11/X11.h, that you can require instead?
6
You'll need to use a conditional for this.
%if 0%{?suse_version} # any version of SuSE
BuildRequires: libX11-devel
%else
BuildRequires: xorg-x11-libX11-devel
%endif
Further information can be found from OpenSUSE and Fedora wikis respectively.
1
You might want to go through the Packaging pages over on the Fedora Project's wiki. I also looked through the wiki topic How to Create an RPM Package and saw no mention of it there either.
2
An .rpm file is actually a form of cpio archive, which is a lot like a simple form of tar. The rpm2cpio utility is probably installed on the system and does not require privileges to use; it writes to standard out, so to convert:
rpm2cpio whatever.rpm > whatever.cpio
There's a man cpio you can look at yourself, but what you now want to do is feed the ...
4
There are ways to install rpms in a user directory using rpm, but I don't believe it is straight-forward. I don't believe there is a way with yum.
My standard practice has become to compile from source to a local directory in my home
$ mkdir ~/local
$ mkdir ~/local/bin
$ mkdir ~/local/lib
$ mkdir ~/local/include
I download source as I would to ...
Top 50 recent answers are included

