Hello,
I want to install 2 versions of a package, as I need these 2 versions for several projects :
- cmake 2.6 patch4
- cmake 2.8
How can I install these 2 packages versions definitely (I can play with my \$PATH or update-alternatives) ?
Regards,
Remi
Hello,
I want to install 2 versions of a package, as I need these 2 versions for several projects :
If the package doesn’t offer it on themself you can’t do it easily unfortunately. The suggestion to use chroots for the different version is the best approach you can go. I suggest the package schroot that will enable you to reuse your homedirectory content in a quite convenient and straight-forward way.
You should rather recommend schroot. dchroot is only there for compatibility with the old dchroot that used to be managed by the Debian System Administrators.
Use good old and flexible method - installation from upstream source code. Most configuration/build scripts usually support --prefix argument. So, you can choose where to install.
The following is a matter of taste and particular use-case. For example, pass --prefix=/usr/local/pkgname-version option to ./configure. After the installation - add /usr/local/pkgname/bin into PATH; and later - switch between versions via "ln -fns /usr/local/pkgname-version /usr/local/pkgname".
cmake upstream even provides precompiled binaries wrapped into a shell script which accepts —prefix option.
Hi, the easiest way for that package is to use the cmake shell script, and then playing with my PATH. Thanks for your help!
Maybe setup chroots using debootstrap? and then switching the chroot depending on which project you are working on?
http://wiki.debian.org/chroot
http://wiki.debian.org/Debootstrap
Another nice solution is cowbuilder if you need faster creation. After creating an image (—create), try using —login and —bindmount /dir to work with new environment.
You could try to extract the files in a directory and try to use them from that non-standard location. You may need to set LDLIBRARYPATH variable. Beware that this may not work for all packages because extract is just one step of the install process (no preinst script and no configuration).
Look at dpkg-deb -x.