Skip to content

Instantly share code, notes, and snippets.

@reagent
Last active November 24, 2018 15:07
Show Gist options
  • Select an option

  • Save reagent/3738e133802c89c8084b7d58503af6ee to your computer and use it in GitHub Desktop.

Select an option

Save reagent/3738e133802c89c8084b7d58503af6ee to your computer and use it in GitHub Desktop.

Installing libcurl with Updated OpenSSL Support

If your Linux distribution is so out of date that you can no longer install updated patches, you'll typically need to either reach for an unsupported package or install the software via source. Additionally, I didn't want to interfere with installed software in fear of rendering the system unusable.

Become Root and Grab Tarballs

You're going to be installing stuff that requires root access, so it's easier to just be able to do it when you want without having to worry about using sudo and permissions. Be careful you don't delete anything you can't recover

sudo su - 
mkdir -p /usr/local/src && cd /usr/local/src

Grab packages via cURL if possible (if the system version is too out of date, this may fail). If not, just download to your local machine and SCP up to your target host.

curl https://www.openssl.org/source/openssl-1.1.0c.tar.gz -o openssl-1.1.0c.tar.gz
curl https://curl.haxx.se/download/curl-7.52.1.tar.gz -o curl-7.52.1.tar.gz

tar xzf openssl-1.1.0c.tar.gz
tar xzf curl-7.52.1.tar.gz

cd /usr/local/src/openssl-1.1.0c ./config --prefix=/usr/local/openssl-1.1.0c --openssldir=/usr/local/openssl-1.1.0c make && make install

echo /usr/local/openssl-1.1.0c/lib >> /etc/ld.so.conf.d/ssl.conf ldconfig

cd /usr/local/src/curl-7.52.1 ./configure --prefix=/usr/local/curl/7.52.1 --with-ssl=/usr/local/openssl-1.1.0.c make && make install

PATH=/usr/local/curl/7.52.1/bin:/usr/bin:/bin STATIC_BUILD=1 /usr/local/bin/gem install curb
-v 0.9.3
--install-dir=/var/www/dwellagent/production/shared/bundle/ruby/1.9.1/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment