[SOLVED] cURL with SSL dependency problems with libssl.so and libcrypto.so

Discussion in 'Command Line' started by Vijay Kanta, Aug 8, 2013.

  1. Vijay Kanta

    Vijay Kanta New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I recently installed Ubuntu 64bit and completed the LAMP stack installation with both cURL and openSSL with few commands. When I try the same in the 32 bit Ubuntu, the installation fails at the point when we type 'make' for cURL.


    Code:
    openSSL (success)
    ./configure enable-shared
    make
    make install
    cURL
    ./configure --with-ssl=/usr/local/ssl --with-zlib
    make
    ERROR:
    /usr/bin/ld: warning: libssl.so.1.0.0, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)
    /usr/bin/ld: warning: libcrypto.so.1.0.0, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)
    The two so files do reside in the /usr/local/ssl directory, but I don't know how to solve this issue.
  2. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,156
    Likes Received:
    389
    Trophy Points:
    83
    So the linker is not finding libssl.so.1.0.0 and libcrypto.so.1.0.0. The files libssl.so and libcrypto.so should be links to each of these files. Are you sure all of those files are in /usr/local/ssl ? That they are linked correctly? Are you sure the 32 bit versions of those libraries are installed?

    Try adding /usr/local/ssl to /etc/ld.so.conf and running
    ldconfig -v
  3. Vijay Kanta

    Vijay Kanta New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Yes, the two files are there. There is no distinction as to whether they are 32 or 64bit versions, because OpenSSL never gave me an option. It was just a tarball.

    Also, I added the entry to the ld.so.conf and ran ldconfig -v which gave me out a big list of shared objects but few are missing from the terminal head.

    Should I now try installing everything again?
  4. Vijay Kanta

    Vijay Kanta New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    One thing I noticed in the cURL's config.log

    Code:
    ./conftest: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
    I did this after doing the following

    Code:
    env CPPFLAGS="-I/usr/local/ssl/include" LDFLAGS="-L/usr/local/ssl/lib" LIBS="-lcrypto -lssl" ./configure --with-ssl=/home/user/openssl-1.0.1e --with-zlib
  5. Vijay Kanta

    Vijay Kanta New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I resolved the issue.

    It was so silly of me to overlook cURL's website documentation. All I had to do was pass in the environment variable for the run time linker to use the shared libraries before configure.

    Code:
    env LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl --with-zlib
    ..and it worked without any issues. I now have https support in even Ubuntu 32bit. Here's the documentation link http://curl.haxx.se/docs/install.html

Share This Page