Hot answers tagged

52

apt-get install libcurl4-gnutls-dev or apt-get install libcurl4-openssl-dev depending on whether you want to use gnutls or openssl for SSL.


43

The 3 packages that you found to contain curl-config: libcurl4-gnutls-dev libcurl4-nss-dev libcurl4-openssl-dev All seem to have the same functionality. I installed the first of these via Synaptic Package Manager and was then able to install RCurl from CRAN. So, if you choose the first option, open a terminal box and do sudo apt-get install libcurl4-...


31

Answers to the different updates First question You need the command sudo apt-get install curl The install is missing in the command you use: sudo apt-get curl won't work because apt-get does not have a command curl. First update Also you want to run update first: sudo apt-get update And you might want to consider using this command: sudo apt-get ...


22

After you've defined "proper use", use wget. Why? That's why: Recursive! wget's major strong side compared to curl is its ability to download recursively, or even just download everything that is referred to from a remote resource, be it a HTML page or a FTP directory listing. Shameless copied from here curl library. curl is powered by libcurl – a ...


16

There are many tools that can download like curl ,snarf , wget, pavuk, fget, fetch, lftp ,aria2 , HTTrack etc. Use it according to your requirement and which feature you want to use along with downloading. Check feature table and use accordingly . Curl : Curl support more protocol FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, ...


15

What it means is that you don't have curl installed and you need to install curl to use it. This can be done by going to a terminal CTRL + ALT + T then entering sudo apt-get install curl libcurl3 libcurl3-dev php5-curl. This will install curl, php and the necessary libraries to provide you with the functionality that you need. After the installation has ...


12

I found it. I must use curl -LOk and it works fine. wget command is good too.


11

CURL is needed for rvm, specifically it is used for the installer script (which is made to be 'run everywhere'), and since Mac doesn't ship with wget but does with curl, they use curl. From CURL man page curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, ...


11

There are many ways, of course, but I start with one which is simple to explain: it just requires some command line magic. I assume that there is internet connection (check it for example with ping -c 5 google.com. Also, I assume that /my/file is the location of file you would like to submit, and JohnDoe is your askubuntu nickname. The simplest of it all, ...


8

You have to compile curl with sftp support first. Download and unpack the curl source. After that: sudo apt-get install build-essential debhelper libssh2-1-dev sudo apt-get source libcurl3 sudo apt-get build-dep libcurl3 cd curl-x.xx.x/debian nano rules find and replace "--without-libssh2" with "--with-libssh2" cd .. sudo dpkg-buildpackage cd .. ...


8

the -e option allows you to provide commands as in wgetrc at the command line so you do not need to change a file ... wget -e use_proxy=yes -e http_proxy=$proxy http://askubuntu.com


8

For PHP: install curl sudo apt-get install php5-curl restart apache sudo apache2ctl restart


8

@muru is correct, however if you are trying to send a json encoding your base64 data may be too large for the command line and you may prefer something like this: (echo -n '{"image": "'; base64 ~/Pictures/1.jpg; echo '"}') | curl -H "Content-Type: application/json" -d @- http://some/url/ The -X POST is implied by -d.


7

Workaround if apt-get still works behind the proxy add sources manually to /etc/apt/sources.list add gpg key Adding sources manually I think on launchpad.net every ppa still contains a small description how to add sources manually. The launchpad site for your mentioned ppa ppa:nilarimogard/webupd8 is https://launchpad.net/~nilarimogard/+archive/webupd8. ...


6

On ubuntu/debian, this file is in /etc/ssl/certs/ca-certificates.crt. You could symlink it. The /etc/pki/ path is used on Redhat.


6

You can try typing: wget --spider It gives for example: Tryb spider włączony. Sprawdź czy zdalny plik istnieje. --2013-12-12 20:37:17-- http://askubuntu.com/questions/389910/get-the-size-of-a-remote-file-from-terminal Translacja askubuntu.com (askubuntu.com)... 198.252.206.24 Łączenie się z askubuntu.com (askubuntu.com)|198.252.206.24|:80... połączono. ...


5

Actually it seems to be much easier than the answer posted previously. You just need "sudo" to know that you are behind a proxy and it will work effortlessly. To do this, you need to export your proxy for http and https the way you usually do: export http_proxy=http://username:password@host:port/ export https_proxy=https://username:password@host:port/ and ...


5

By default, the filename of the URL is used as the target filename. If redirection occurs, it is preferable to use the final filename. That can be accomplished with the --trust-server-names option of wget: wget --trust-server-names http://example.com/file.php From the manual page of wget: --trust-server-names If this is set to on, on a redirect the ...


5

If you want to download the file use wget [option]... [URL]... instead. For more information regarding the options, just type this into your Terminal: man wget For you purpose: wget http://github.com/ziyaddin/xampp/archive/master.zip Note that the .zip file will be saved in the current directory you are in.


5

Without modifying your system files at /etc/wgetrc you could create a file at your home directory ~/.wgetrc. It will enable you to modify wget settings locally at user level. Now write the following at ~/.wgetrc to use wget behind a proxy server: use_proxy = on http_proxy = http://username:password@proxy.server.address:port/ https_proxy = http://username:...


5

You need to specify the directory where OpenSSL is installed (your symlink is neither necessary nor sufficient) ./configure --with-ssl=/usr/local/ssl EDIT: Alternatively, you can set your PKG_CONFIG_PATH environment variable (as suggested by ./configure --help): PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig ./configure


5

In general there are more appropriate ways of parsing JSON objects, but since in this case the JSON object is very simple you may store curl's output in a variable (which is possible) and just use AWK: var="$(curl ipinfo.io/"8.8.8.8" 2>/dev/null)" <<<"$var" awk -F'"' '$2=="city"{printf("%s, ", $4)}$2=="region"{print $4}' % var="$(curl ipinfo....


5

Explanation of the line: curl -sL https://deb.nodesource.com/setup | sudo bash - curl flags and options: -s <==> Silent mode -L <==> or --location, will follow redirects sudo bash: The minus sign behind sudo bash in fact means take the input comming from the pipe and treat it as a bash script. and that is exactly what this link ...


4

In tcsh: echo | openssl s_client -connect host.example.com:443 |& openssl x509 -fingerprint -noout


4

curl -s -u twitterusername:twitterpassword https://stream.twitter.com/1/statuses/sample.json -o "somefile $(date + format).txt" Where, format can be any one of the following: %a : Abbreviated weekday name (Sun..Sat) %b : Abbreviated month name (Jan..Dec) %B : Full month name, variable length (January..December) %d : Day of month (01..31) %e : Day of month,...


4

From man curl: -x, --proxy <[protocol://][user@password]proxyhost[:port]> Use the specified HTTP proxy. If the port number is not specified, it is assumed at port 1080. For general use, declare environment variables for http/https export http_proxy=http://your.proxy.server:port/ export https_proxy=$http_proxy edit /etc/bash.bashrc add to the ...


4

You can try this even in Yahoo prompt bash ... you will get a login accepted curl --user name:password http://mail.yahoo.com -v curl is the way to do it in bash.


4

Easiest way to bash login: wget --save-cookies cookies.txt --keep-session-cookies --post-data="username=foo&password=bar" "http://some.site/login.php" Although some websites may have some restrictions to login like this.



Only top voted, non community-wiki answers of a minimum length are eligible