How to install two different versions of the same package with yum

Let's say I want to install two different versions of the same package.

To be specific, I want to install two versions of the Javascript binding for the GNOME package, gjs. I want to have gjs-1.38.1-1.fc20.x86_64 and gjs-1.36.1-1.fc19.x86_64 .

There are other packages in Fedora 20 that are highly dependent on gjs-1.38.1-1.fc20.x86_64 , so replacing it with gjs-1.36.1-1.fc19.x86_64 not possible.

I have one specific program that is not compatible with gjs-1.38.1-1.fc20.x86_64 and needs the previous one.

So, is it possible to install the previous version of gjs gjs-1.36.1-1.fc19.x86_64 and access it using /usr/bin/env gjs1 (for some magic!) To run an incompatible program without breaking anything?

+9
package rpm yum
source share
3 answers

As far as I know, there is no simple yum command to do what you want to do, it will take a bit of effort. I will give a few ways that I know of. Perhaps your use case excludes one or more or all of the following.

Software Collections (SCL). The goal of SCL is to have multiple versions of a package or set of packages. There is a user manual , and here are some, but they seem to be more focused on RHEL. If you go to this option, I think you will need to create your own collection.

You can install the F19 package in your own installation root. Here is a blog post explaining how to do this (for example, this is rawhide root, but should be possible with f19 as well). This is probably the path of least effort, but I'm not 100% sure if it will work for your situation. It will have to install many things, but it needs to be done because packages in different versions of Fedora will be created against different sets of dependencies.

This method may or may not work, I think it should, at least to some extent; but may require significant effort. This is based on the assumption that you actually want gjs-1.36.1 and not any packaged version of that from a previous version of Fedora. If you go to the source repository for gjs and click on releases, you can download the archive file for the version you need. Then you can build it from the source by specifying a different prefix at the configuration stage than the default value /usr - perhaps /usr/local will be fine. Then, if you install it, you can specify the full path to, for example /usr/local/bin/gjs instead of /usr/bin/gjs . Note that the default value will be found at the beginning of your $PATH , so if /usr/local/bin before /usr/bin , you will either want to change your PATH order, or set your own version to something other than /usr/local .

In connection with the latter, you can get the RPM specification file for gjs and edit it so that you call it a different name and set it to a different location. This might be simpler if you are not used to building gjs, as it has instructions for rpmbuild on how to compile. Perhaps you can get at least some hints if you choose the previous option. See the gjs specification file here .

It may also be possible to do some magic using alternatives , like what was done with java and other packages. This will most likely require the use of the aforementioned spec file, but also to make some changes to it to work with alternatives - possibly installed custom packages for both versions 1.36.1 and 1.38.1.

Good luck

0
source share

As is usually done in the Fedora / RedHat world, a secondary β€œ compat ” package is compat , so it will be something like compat-gjs-136 , where you have the spec file, add 136 suffix for all executable files and libraries. Some examples you might want to pay attention to are compat-gcc-34 and compat-expat1 .

0
source share
 yum --nogpgcheck --releasever=20 install package-name 

perhaps an ugly option as a last resort. not recommended in a regular system.

-one
source share

All Articles