On 12 February 2016 at 15:11, Alexey Zaharov wrote: | Probably you would like to know, that I have managed to solve the problem | by using `schroot`.
Good call. We (as in Debian package managers) do something very similar for package building, of course. And there is an entire infrastructure for it. | It can attach current user `home` folder to `rootfs` from `chroot` where. | | After I have configured the `trusty64`, I have just created a clone. | Inside the clone I have installed another version of R from CRAN repo. | <--------------------------------START-------------> | root@chroot-test:/# schroot -l | chroot:trusty64 | chroot:trusty64_clone | | | $ cat /etc/schroot/chroot.d/trusty64.conf | [trusty64] | description=Ubuntu 14.04 Trusty Tahr | directory=/test/schroot/trusty64 | users=quant | type=directory | profile=desktop | #personality=linux | preserve-environment=true | root-groups=root | | $ cat /etc/schroot/chroot.d/trusty64_clone.conf | [trusty64_clone] | description=Ubuntu 14.04 Trusty Tahr | directory=/test/schroot/trusty64 | users=quant | type=directory | profile=desktop | #personality=linux | preserve-environment=true | root-groups=root | | root@chroot-test:/etc# debootstrap --variant=minbase --arch amd64 trusty / | test/schroot/trusty64/ http://archive.ubuntu.com/ubuntu/ | | | root@chroot-test:/etc# schroot -c trusty64 -u quant | root@chroot-test:/etc# schroot -c trusty64_clone -u quant | <--------------------------------END---------------> That works. The key is that (as I said earlier) the path from / to the R binaries and libs are 'fixed' at compile time -- but you can run several virtual environment on the box to 'fake' different / path. Docker is one (portable) way and we offer a bunch of R containers for it already, and within the Debian/Ubuntu world one can of course use different chroot-based solutions: dchroot, schroot, pbuilder, cowbuilder, ... Thanks for pointing that last part out. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian