I would like to install some programs on my work development server because it is missing some programs I need for my day to day job. I don't have root access.
What I did up to now is compiling the software I needs with option
--prefix=/path/to/local/root. I then created a script that looks like that:
#!/bin/sh export LOCAL_PATH="/path/to/local/root" export LD_LIBRARY_PATH="$LOCAL_PATH/lib:$LOCAL_PATH/lib64:$LOCAL_PATH/lib64:$LD_LIBRARY_PATH" binary=$(basename $0) $LOCAL_PATH/bin/$binary "$@"
Then, if I create symlink to this program with the right name, it will run the local version. However, I have some issues:
- The install folder might move from time to time. I happened recently and I had to reinstall everything
- Some programs use
libtool, which ignores the
LD_LIBRARY_PATHwhen it finds a library in
/usr/lib(which in my case was outdated)
- The programs are hard to maintain or update
For the first two problems, it seems that creating a
chroot would solve the problem. Would
fakechroot help in that case ? Will my script still work ?
Also, the last issue makes me think about switching to a package manager. I was thinking about portage (from Gentoo, which I use at home), but maybe there are some more suited for my needs. Any suggestion? Maybe a lightweight Linux distribution ?
Finally, do I need to symlink
/local/lib64 together ?