Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to install 2 different versions of OpenSSL simultaneously. I am currently using Amazon EC2 with the Amazon 32-bit AMI, which currently runs OpenSSL 1.0.0a. I have an old piece of software that I need to run that requires OpenSSL.0.9.6. Unfortunately, from what I have learned, OpenSSL is not backwards-compatible so I will need to install both versions simultaneously. I have found an RPM that will work, however, I have no idea how to go about installing them simultaneously without breaking anything. Any information on this subject would be greatly appreciated.

Thanks

share|improve this question

3 Answers 3

My guess is that you're running a distribution that doesn't have sane policies about naming library packages relative to the soname of the object(s) contained within it, and which also has conniptions about installing multiple versions of the same package.

In this case, your only option is to unpack the package by hand (I believe rpm2cpio is the starting point on that particular crusade, unless there's an rpm option that does the trick) and place the relevant files in the correct location(s). If you're only after libssl and (as a result) libcrypto, this should be fairly straightforward -- you copy libssl.so.0.9.6 and libcrypto.so.0.9.6 into place, and ldd on the problematic binary should show happiness.

If you do need the whole OpenSSL suite of a particular version, you need to publically name and shame the vendor, for the good of the Internet, because that's just ridiculous.

share|improve this answer
    
I had tried this, and although it appeased ldd it still caused the application to crash. –  OldSpiceArcticForce Aug 27 '11 at 3:40
1  
Then something else is going on. Time to diagnose the crash. I assume you've completely appeased ldd? –  womble Aug 27 '11 at 3:42
    
+1 for correctly referring to ldd as a god. –  polynomial Aug 27 '11 at 3:46
    
Yes, it is completely appeased. The application runs fine until it receives a new connection at which point it crashes without leaving any error messages. I have it running correctly on an old CentOS version that has the correct OpenSSL version installed naturally. This is why I narrowed the error down to OpenSSL. –  OldSpiceArcticForce Aug 27 '11 at 3:47
    
Because the only thing different between CentOS 5 and CentOS 6 is the OpenSSL version... seriously, something's broken, but to say it's definitely OpenSSL is incredibly naive and counterproductive. At this point in time, you either need to get the vendor involved (which is likely to result in "we don't support CentOS 6, go away"), or fire up gdb and start taking stack traces. –  womble Aug 27 '11 at 3:54

One option would be to simply setup a chroot on your system with the distro that has the set of packages you need. This will take up more storage, and will mean that you have to do maintenance on both the root OS, and the chroot, but it would allow you to run one app in the chroot that requires an older set of libraries on the same system that you run applications that require up-to-date libraries.

share|improve this answer

I've done this on a BSD box without any issues. Just make sure to only install the libraries and not overwrite the actual 'openssl' binary (manpages too).

It would probably be safer to just rpm2cpio and extract the libraries.

share|improve this answer
    
I tried placing the 2 required libraries libssl.so.0.9.6 and libcrypto.so.0.9.6 in the directory and it got past the error but it still caused the application crash. If I install all the libraries from the RPM would it still work correctly with the newer binary? –  OldSpiceArcticForce Aug 27 '11 at 3:35
    
You should get more details about the crash, can you run it inside of strace and see what is causing the crash? Incorrect system call? –  polynomial Aug 27 '11 at 3:45
    
I will try it out. Thanks. –  OldSpiceArcticForce Aug 27 '11 at 4:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.