Skip to content

Instantly share code, notes, and snippets.

@fideloper
Last active January 11, 2024 15:23
Show Gist options
  • Save fideloper/f72997d2e2c9fbe66459 to your computer and use it in GitHub Desktop.
Save fideloper/f72997d2e2c9fbe66459 to your computer and use it in GitHub Desktop.
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
cd curl-7.50.2
# The usual steps for building an app from source
# ./configure
# ./make
# sudo make install
./configure
make
sudo make install
# Resolve any issues of C-level lib
# location caches ("shared library cache")
sudo ldconfig
@jlis
Copy link

jlis commented Nov 8, 2018

Great help!

@Carlos-Henreis
Copy link

Perfect

@hardword
Copy link

Thanks!!!

@Globerada
Copy link

Globerada commented Jan 9, 2019

EDITED: Great... Not working. Curl is giving no response.
Also PHP info is showing another version of curl: cURL Information | 7.47.0
I did sudo service apache2 restart

ubuntu@globerada:~$ curl -Vv
curl 7.63.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Release-Date: 2018-12-12
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
ubuntu@globerada:~$ curl https://www.google.com
ubuntu@globerada:~$

Thank you, it works. I have updated to latest (7.63.0 on 2019-01-09) because I had some problems with Curl 7.49 and Guzzle.

Steps for Ubuntu 16.04

touch update_curl.sh
chmod u+wx update_curl.sh
nano update_curl.sh


#! /usr/bin/env bash
sudo apt-get build-dep curl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.63.0.tar.bz2
tar -xvjf curl-7.63.0.tar.bz2
cd curl-7.63.0
./configure --prefix=/usr
make
sudo make install
sudo ldconfig


./update_curl.sh

@jaymedici
Copy link

Thanks dude!

@lvm3632
Copy link

lvm3632 commented Jun 26, 2020

EDITED: Great... Not working. Curl is giving no response.
Also PHP info is showing another version of curl: cURL Information | 7.47.0
I did sudo service apache2 restart

ubuntu@globerada:~$ curl -Vv
curl 7.63.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Release-Date: 2018-12-12
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
ubuntu@globerada:~$ curl https://www.google.com
ubuntu@globerada:~$

Thank you, it works. I have updated to latest (7.63.0 on 2019-01-09) because I had some problems with Curl 7.49 and Guzzle.

Steps for Ubuntu 16.04

touch update_curl.sh
chmod u+wx update_curl.sh
nano update_curl.sh

#! /usr/bin/env bash
sudo apt-get build-dep curl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.63.0.tar.bz2
tar -xvjf curl-7.63.0.tar.bz2
cd curl-7.63.0
./configure --prefix=/usr
make
sudo make install
sudo ldconfig

./update_curl.sh

Thanks! It works! :)
Also I restarted my service in order to get visible the changes with the command:
systemctl restart apache2

@Rockstar5645
Copy link

@derylspielman thanks a bunch

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