Skip to content

Instantly share code, notes, and snippets.

@loren138
Last active September 11, 2015 14:16
Show Gist options
  • Save loren138/3ab524cfb1acd424660a to your computer and use it in GitHub Desktop.
Save loren138/3ab524cfb1acd424660a to your computer and use it in GitHub Desktop.
Fix Curl SSL Connection Errors in Ubuntu 14.04 14.10 15.04
#!/bin/bash
# Fix curl/gnutls SSLv3 on Ubuntu 14.04
#
# The curl version on Ubuntu 14.04 Trusty Tahr has a bug (through gnutls) in
# its SSLv3 support. This also affects git.
#
# This script will rollback curl, libcurl3, and libcurl3-gnutls to the version in Ubuntu 12.04.
# Unfortionately, it does not seem to be possible to automatically update for security patches
# so you must manually check for curl updates at the url below.
#
set nounset
set errexit
set pipefail
cd "$(mktemp -d)"
# Check for updates before running (https://launchpad.net/ubuntu/precise/+source/curl)
wget "http://launchpadlibrarian.net/205145523/curl_7.22.0-3ubuntu4.14_amd64.deb"
wget "http://launchpadlibrarian.net/205145525/libcurl3_7.22.0-3ubuntu4.14_amd64.deb"
wget "http://launchpadlibrarian.net/205145528/libcurl3-gnutls_7.22.0-3ubuntu4.14_amd64.deb"
# If you get missing librtmp0_2
# wget http://mirrors.kernel.org/ubuntu/pool/main/r/rtmpdump/librtmp0_2.4~20110711.gitc28f1bab-1_amd64.deb
sudo apt-get remove -y landscape-client python-pycurl
# Install the new packages.
sudo dpkg -i *.deb
# Hold these libraries so Ubuntu won't upgrade them back to the (broken) version included in 14.04
sudo apt-mark hold curl libcurl3 libcurl3-gnutls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment