Q: how to make a self compile binaries running at other linux pc i was trouble in a problem, i want to compile a project, when i was finished, it's working well on the PC(centos 6.4) which i was compiled it, but when i copy the binaries file to the other pc(centos 6.4) and try to run it, there is and error about dependences:
error message:
./nano: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
and then i try to find out how many dependences was lost:
[root@localhost ~]# ldd nano
libcurl.so.4 => not found
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003959e00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003959200000)
/lib64/ld-linux-x86-64.so.2 (0x0000003958e00000)
[root@localhost ~]# 
and, i try the other pc(redhat) again:
[root@localhost ~]# ldd nano
/usr/bin/checkdisk: /usr/lib64/libidn.so.11: no version information available (required by /usr/lib64/libcurl.so.4)
/usr/bin/checkdisk: /lib64/libc.so.6: version GLIBC_2.7 not found (required by /usr/lib64/libcurl.so.4)
/usr/bin/checkdisk: /lib64/libc.so.6: version GLIBC_2.11 not found (required by /usr/lib64/libcurl.so.4)
/usr/bin/checkdisk: /usr/lib64/libnss3.so: version NSS_3.12.5 not found (required by /usr/lib64/libcurl.so.4)
/usr/bin/checkdisk: /lib64/libc.so.6: version GLIBC_2.12 not found (required by /lib64/libldap-2.4.so.2)
/usr/bin/checkdisk: /usr/lib64/libnss3.so: version NSS_3.12.9 not found (required by /lib64/libldap-2.4.so.2)
/usr/bin/checkdisk: /usr/lib64/libnss3.so: version NSS_3.12.5 not found (required by /lib64/libldap-2.4.so.2)
/usr/bin/checkdisk: /lib64/libc.so.6: version GLIBC_2.7 not found (required by /usr/lib64/libcrypto.so.10)
[root@localhost ~]# 
so, anyone can help me how to make it work well on other centos/redhat? thanks very much.

A: This is a very hard problem.  It's just not the way things are done in most GNU/Linux distributions.  There are good reasons for both sides of this argument; Google can help you to learn about it.
It is possible to do what you want, which is called static linking.  The difficulty varies depending on the type of library you're using.  Unfortunately for you, curl is on the "very difficult" side, because curl itself depends on lots of other libraries; try running ldd on the libcurl.so.4 on the system where it works and see how many things it requires... to fully statically link a program with curl you ALSO have to statically link all those other libraries as well... and in the right order!  That's not simple and there aren't good tools to make it simple, because this is not the preferred way of doing things.
So, by far the easiest solution is to use your package manager to install those libraries on the target system.  If you are building a package yourself, you can define in your package that it requires the other packages (like curl) then the package manager will ensure they're installed.
