Say I want to install two different versions of same package.
To be specific, I want to install two versions of Javascript binding for GNOME, gjs package. 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 which greatly depends on gjs-1.38.1-1.fc20.x86_64
so it's impossible to replace it by gjs-1.36.1-1.fc19.x86_64
.
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 to access the it by /usr/bin/env gjs1
(by some magic!) to run the incompatible program without breaking anything?
As far as I'm aware, there isn't a simple yum command to do what you want to do, it will involve a little bit of effort. I'll list a couple of ways that I'm aware of. It might be that your use case eliminates one or more or all of the below.
Software collections (SCL). The aim of SCL is to be able to have multiple versions of a package or set of packages installed. There's a User Guide, and there's a page here with some collections, but they appear to be more targeted at RHEL. If you go with this option, I think you'll have to create your own collection.
You may decide to install the F19 package in its own install root. Here's a blog post that explains how to do this (example is of a rawhide root, but should be possible with an f19 one also). This is probably the path of least effort, but I'm not 100% sure if it will work for your situation. It will need to install a lot of stuff, but it's necessary to do it like this because packages in different Fedora releases will have been built against different dependency sets.
This way may or may not work, I think it should, to a degree at least; but may require considerable effort. It's based on the assumption that what you want is actually gjs-1.36.1
rather than any packaged version of that from a previous fedora release. If you go to the source repository for gjs and click on releases, you'll be able to download an archive file for the version you want. Then you can build it from source, specifying a different prefix at the configure step than the default of /usr
-- maybe /usr/local
will be ok. Then if you get it installed, you can specify full path to, for example /usr/local/bin/gjs
instead of /usr/bin/gjs
. Note that the default will be whichever one is found first on your $PATH
, so if /usr/local/bin
is before /usr/bin
, then you'll either want to change your PATH
order, or install your custom version into a different location than /usr/local
.
Related to the last option, you could maybe get the RPM spec file for gjs
and edit it so that you're calling it a different name, and installing it to a different location. This might be more straightforward if you're not used to building gjs, since it has instructions for rpmbuild on how to compile. You might be able to get some hints at least from this, if you choose the previous option. See gjs spec file here.
It might be possible also to do some magic using alternatives
like what's done with java
and other packages. This would likely require you to use the aforementioned spec file, but also to make some modifications to it to work with alternatives
-- possibly installed custom packages for both versions, 1.36.1 and 1.38.1.
Good luck!