Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Desirable result:

compile a binary with statically linked openssl 1.0.1e but dynamically linked glibc, stdc++, etc. Binary should run on most servers, for example Ubuntu 11.04 or RHEL 6, CentOS 6.4.


code I want to compile depends on openssl 1.0.1e. Openssl 1.0.1e depends on glibc found in newer versions of Ubuntu (like 12.04, glibc 2.13) and doesn't compile against the one found in Ubuntu 11.04.

The binary compiled on Ubuntu 12.04 fails to run on Ubuntu 11.04 with error message:

$BINARY: /usr/lib/x86_64-linux-gnu/ version `GLIBCXX_3.4.15' not found (required by $BINARY)

How can I compile my binary so it runs on old Ubuntus and RHEL6, CentOS 6.4?

share|improve this question
Welcome to Superuser!, you might be checking out Unix & Linux the answer might be there – 50-3 Sep 11 '13 at 5:13
Why not just upgrade to Ubuntu 12.04? – Braiam Sep 20 '13 at 15:58
@Braiam hi there, it's not my choice, I am distributing the binary to the end users bundled with application. There is no way to force all users to upgrade their ubuntus :) – imslavko Sep 20 '13 at 17:57

You must log in to answer this question.

Browse other questions tagged .