Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@mattstauffer

This comment has been minimized.

Show comment
Hide comment
@mattstauffer

mattstauffer Mar 2, 2016

<3 I owe you a lot of coffee or beer or something

<3 I owe you a lot of coffee or beer or something

@aalhour

This comment has been minimized.

Show comment
Hide comment
@aalhour

aalhour Jun 7, 2016

Thanks a lot for sharing this!

aalhour commented Jun 7, 2016

Thanks a lot for sharing this!

@harisk73

This comment has been minimized.

Show comment
Hide comment
@harisk73

harisk73 Jul 13, 2016

Thank you very much, a beer from me too :)

Thank you very much, a beer from me too :)

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Sep 11, 2016

added to my LAMP install Script

ghost commented Sep 11, 2016

added to my LAMP install Script

@bakytn

This comment has been minimized.

Show comment
Hide comment

bakytn commented Sep 14, 2016

Thanks!

@rustam

This comment has been minimized.

Show comment
Hide comment
@rustam

rustam Sep 26, 2016

Thanks, it saved my time.

rustam commented Sep 26, 2016

Thanks, it saved my time.

@janhenkgerritsen

This comment has been minimized.

Show comment
Hide comment

Thanks!

@richardpq

This comment has been minimized.

Show comment
Hide comment

Thanks!!!

@kivison

This comment has been minimized.

Show comment
Hide comment
@kivison

kivison Nov 2, 2016

This was one of those "I dont really know what I am doing" moments but trusted that you did.
Trust Confirmed! Thank you, worked a treat :)
Regards
Keet

kivison commented Nov 2, 2016

This was one of those "I dont really know what I am doing" moments but trusted that you did.
Trust Confirmed! Thank you, worked a treat :)
Regards
Keet

@fideloper

This comment has been minimized.

Show comment
Hide comment
@fideloper

fideloper Nov 2, 2016

I don't know what I'm doing either! 🎉 👍

Owner

fideloper commented Nov 2, 2016

I don't know what I'm doing either! 🎉 👍

@derylspielman

This comment has been minimized.

Show comment
Hide comment
@derylspielman

derylspielman Nov 13, 2016

I tried upating to curl 7.51.0 but when I run curl --version I still see the old version 7.35.0.

curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.51.0 OpenSSL/1.0.1f zlib/1.2.8 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP

Running which curl shows /usr/bin/curl but the script seems to install 7.51.0 in /usr/local/bin/curl. To specify /usr/bin/curl as the path it's installed to change the ./configure to ./configure --prefix=/usr

derylspielman commented Nov 13, 2016

I tried upating to curl 7.51.0 but when I run curl --version I still see the old version 7.35.0.

curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.51.0 OpenSSL/1.0.1f zlib/1.2.8 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP

Running which curl shows /usr/bin/curl but the script seems to install 7.51.0 in /usr/local/bin/curl. To specify /usr/bin/curl as the path it's installed to change the ./configure to ./configure --prefix=/usr

@bsingarayan

This comment has been minimized.

Show comment
Hide comment
@bsingarayan

bsingarayan Nov 26, 2016

good one, thanks!

good one, thanks!

@agarzon

This comment has been minimized.

Show comment
Hide comment
@agarzon

agarzon Dec 29, 2016

@derylspielman is right.

./configure --prefix=/usr should be used in order to replace the default curl binay located in /usr/bin/curl, tested on Ubuntu 14.04 with curl 7.52.1

agarzon commented Dec 29, 2016

@derylspielman is right.

./configure --prefix=/usr should be used in order to replace the default curl binay located in /usr/bin/curl, tested on Ubuntu 14.04 with curl 7.52.1

@parismita

This comment has been minimized.

Show comment
Hide comment
@parismita

parismita Jan 7, 2017

thanks a lot <3

thanks a lot <3

@Yazany6b

This comment has been minimized.

Show comment
Hide comment
@Yazany6b

Yazany6b Jan 9, 2017

Thanks a lot the curl was correctly but i want also to update the openssl version to 1.0.2e can i do that. i have tried many ways but no success.

Yazany6b commented Jan 9, 2017

Thanks a lot the curl was correctly but i want also to update the openssl version to 1.0.2e can i do that. i have tried many ways but no success.

@CraigChilds94

This comment has been minimized.

Show comment
Hide comment

I like!

@Uditmittal

This comment has been minimized.

Show comment
Hide comment
@Uditmittal

Uditmittal Mar 7, 2017

Thanks a lot <3 .

Thanks a lot <3 .

@vishalrekala

This comment has been minimized.

Show comment
Hide comment
@vishalrekala

vishalrekala Apr 19, 2017

Perfect!!!!
Worked like a charm

Perfect!!!!
Worked like a charm

@mpachin

This comment has been minimized.

Show comment
Hide comment
@mpachin

mpachin May 18, 2017

Saved my day! Thank you!

mpachin commented May 18, 2017

Saved my day! Thank you!

@mangowalrus

This comment has been minimized.

Show comment
Hide comment
@mangowalrus

mangowalrus Jun 7, 2017

Where do I run this and how.?
I have a bitnami Magento stack on AWS and don't know how to do this.
Obviously I can upload to my site, but where do I put it and how do I run it?
Ubuntu 14.04.1 LTS - trusty - PHP 5.4.32 - curl 7.27

mangowalrus commented Jun 7, 2017

Where do I run this and how.?
I have a bitnami Magento stack on AWS and don't know how to do this.
Obviously I can upload to my site, but where do I put it and how do I run it?
Ubuntu 14.04.1 LTS - trusty - PHP 5.4.32 - curl 7.27

@mangowalrus

This comment has been minimized.

Show comment
Hide comment
@mangowalrus

mangowalrus Jun 12, 2017

How do you do this on a .deb installation please?
Making slight brain progress here.
Time is running away ... or it's the chemo ...

mangowalrus commented Jun 12, 2017

How do you do this on a .deb installation please?
Making slight brain progress here.
Time is running away ... or it's the chemo ...

@ywfluctier

This comment has been minimized.

Show comment
Hide comment
@ywfluctier

ywfluctier Sep 26, 2017

Great! Thanks to sharer as well as @derylspielman

Great! Thanks to sharer as well as @derylspielman

@kimh

This comment has been minimized.

Show comment
Hide comment
@kimh

kimh Oct 25, 2017

Just for the people with the same issue: ./configure didn't add SSL support to curl. To do that, I first had to install libssl-dev and then ./configure automatically detect SSL without passing --with-sshl option.

kimh commented Oct 25, 2017

Just for the people with the same issue: ./configure didn't add SSL support to curl. To do that, I first had to install libssl-dev and then ./configure automatically detect SSL without passing --with-sshl option.

@Citrullin

This comment has been minimized.

Show comment
Hide comment
@Citrullin

Citrullin Dec 8, 2017

Download curl with wget is like downloading Firefox/Chrome with an Internet Explorer! :D Thx by the way.

Download curl with wget is like downloading Firefox/Chrome with an Internet Explorer! :D Thx by the way.

@kunasiramesh

This comment has been minimized.

Show comment
Hide comment
@kunasiramesh

kunasiramesh Mar 9, 2018

Thank you 👍

Thank you 👍

@sclass

This comment has been minimized.

Show comment
Hide comment
@sclass

sclass Apr 17, 2018

Thank you.
(I have confirmed that the script works perfectly in the Ubuntu 12.04 distribution.)
Due to the this OCSP bug : https://www.cybersecurity-help.cz/vdb/SB2017022201?affChecked=1
I recommend use the latest version of curl-7.59.0

sclass commented Apr 17, 2018

Thank you.
(I have confirmed that the script works perfectly in the Ubuntu 12.04 distribution.)
Due to the this OCSP bug : https://www.cybersecurity-help.cz/vdb/SB2017022201?affChecked=1
I recommend use the latest version of curl-7.59.0

@iansmith

This comment has been minimized.

Show comment
Hide comment

iansmith commented Jun 6, 2018

Bravo!

@ag1805x

This comment has been minimized.

Show comment
Hide comment
@ag1805x

ag1805x Jun 14, 2018

Superbly done. Thanks

ag1805x commented Jun 14, 2018

Superbly done. Thanks

@EyalPery

This comment has been minimized.

Show comment
Hide comment
@EyalPery

EyalPery Jul 19, 2018

Thanks!
Few notes for the script which helped me:

  1. Check the latest version of curl here: http://curl.haxx.se/download/ and change the script accordingly (i.e every 7.50.2 to 7.60.0)
  2. Change ./configure to ./configure --prefix=/usr
  • Use curl --version to verify it got updated

EyalPery commented Jul 19, 2018

Thanks!
Few notes for the script which helped me:

  1. Check the latest version of curl here: http://curl.haxx.se/download/ and change the script accordingly (i.e every 7.50.2 to 7.60.0)
  2. Change ./configure to ./configure --prefix=/usr
  • Use curl --version to verify it got updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment