Compiled environment operating system: Red Hat Enterprise Linux Server Release 5.4 64-bit Compilation tool: GCC (gcc) 4.1.2 20080704 (Red Hat 4.1.2-46)1. Download LIBSSH2 LibraryAddress: http://www.libssh2.org/download/libssh2-1.4.2.tar.gz upload the libssh2-1.4.2.tar.gz to the/home directory2. Compile and install the LIBSSH2 library$ cd/home$ tar-zxvf libssh2-1.4.2.tar.gz$ cd libssh2-1.4.2$./configure--with-libssl-prefix=/usr/local/openssl$ Make & amp;& make install && make clean Note: If it appears: Configure:error:cannot find OpenSSL or Libgcrypt error is modified to:./configure --with-libssl-prefix=/usr/local/openssl cppflags= "-i/usr/local/openssl/include" LDFLAGS= "-L/usr/local/openssl/ Lib3. Download LibcurlAddress: Http://curl.haxx.se/download.html take the curl-7.27.0.tar.gz package as an example, upload the curl-7.27.0.tar.gz to the/home directory4. Unzip the Libcurl$ cd/home$ tar-zxvf curl-7.27.0.tar.gz$ CD curl-7.27.05. Compiling and installingCompile $./configure--with-ssl=/usr/local/openssl--with-libssh2=/usr/local--with-zlib$ make && make install Cleanup compile-time intermediate files $ make clean6. UseThe generated Libcurl library LIBCURL.A stored in/usr/local/lib can be directly used to participate in the static compilation
From for notes (Wiz)
Linux under compilation Libcurl