You'll have to try to match the 2 somehow, perhaps you can downgrade or upgrade some of the software packages.
Also, there's another possibility - to install a different version of a program if you compile it and specify a private install location, of your choosing. (be sure to check the ./configure options). But also, make sure when you call on programs that you want to use your locally compiled version & export the right variables so that it can find it.
The PlaneShift compiling guide is a good example of that - installing software in specific directories, then exporting those locations.