Yes, it's possible. You'll have to be very careful with the library load paths, and you may need to recompile some other libraries.
As the path of least friction, I recommend installing an older version of Debian or Ubuntu in a chroot. That is, make a directory, say /old/etch
, and install the older distribution in the tree rooted there; to run that problematic program, call chroot
to restrict its view of the filesystem to /old/etch
.
Debian (or Ubuntu) comes with a package to assist with installing another system in a chroot: schroot (successor of dchroot). First, use debootstrap to install the older distribution (install only the base system and what your program needs, no servers). Then set up schroot to run the program conveniently (with /dev
, /proc
, /home
and other “satellite” filesystems accessible).
So the plan is: debootstrap, then dchroot. In How do I run 32-bit programs on a 64-bit Debian/Ubuntu?, I give a tutorial about a similar setup − whether you're running different versions of the distribution, or different architectures, or different Debian-like distributions, it's only a matter of selecting the appropriate package source, the rest is the same.
ldd
would tell you something. If possible you may need to recompile the legacy libc library and/or install/recompile supporting packages. Depending on how old your app is, this could get tricky. I see current Debianlibc6
depends onlibc-bin (= 2.13-0exp5)
andlibgcc1
, solibc6
doesn't have a lot of dependencies, but you could still run into problems. – Faheem Mitha May 03 '11 at 13:15