LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 09-11-2010, 03:45 AM   #1
celerina
LQ Newbie
 
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
Curl won't work on 10.04.1 LTS, but works on 9.10


Heya.

I've been using curl in a script of mine for a while on Ubuntu 9.10, without problems.
Ubuntu 9.10 got the following curl installed through apt-get:
ii curl 7.19.5-1ubuntu2 Get a file from an HTTP, HTTPS or FTP server
ii libcurl3 7.19.5-1ubuntu2 Multi-protocol file transfer library (OpenSS
ii libcurl3-gnutls 7.19.5-1ubuntu2 Multi-protocol file transfer library (GnuTLS
ii libcurl4-gnutls-dev 7.19.5-1ubuntu2 Development files and documentation for libc
ii php5-curl 5.2.10.dfsg.1-2ubuntu6.4 CURL module for php5
ii python-pycurl 7.19.0-1 Python bindings to libcurl

My Ubuntu 10.04.1 LTS got the following curl installed through apt-get

ii curl 7.19.7-1ubuntu1 Get a file from an HTTP, HTTPS or FTP server
rc gnupg-curl 1.4.10-2ubuntu1 GNU privacy guard - a free PGP replacement (
ii libcurl3 7.19.7-1ubuntu1 Multi-protocol file transfer library (OpenSS
ii libcurl3-gnutls 7.19.7-1ubuntu1 Multi-protocol file transfer library (GnuTLS
ii php5-curl 5.3.2-1ubuntu4.2 CURL module for php5



The scripts are exactly the same, but it won't work on Ubuntu 10.04.1 LTS.
Script is

<snip>
USERID="snip"
PASSWORD="snip"
TAKEUPLOAD="http://snip.snip"
curl -b "uid=$USERID; pass=$PASSWORD" -F "file=@$P1.snip" -F "name=$P1" -F "nfo=@$NFO" -F "usenfo=1" -F "descr= " -F "type=$P2" -H "Expect:" $TAKEUPLOAD -D "/tmp/tmp.txt"
<snip>


Error message:

curl: (6) Couldn't resolve host 'uid=snip; pass=snip'
<h1>Not Found</h1>
<p>Sorry pal </p>


Obviously the "snip" is me cutting out sensitive information.

I've tested the script on both boxes within seconds apart so I know the receiving end is working, it has to be something with curl.

Anyone know?

Thanks

Last edited by celerina; 09-11-2010 at 09:49 AM.
 
Old 09-11-2010, 03:43 PM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,382
Blog Entries: 1

Rep: Reputation: 60
I am using 10.04 LTS too with the same curl you has.
Obviously I can't download the same file you are trying to, but using another source and a similar arguments I could download a file without problems:
Code:
miguel@quadbit:~$ curl -V
curl 7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps 
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz 
miguel@quadbit:~$ TAKEUPLOAD="http://www.linuxquestions.org/questions/ubuntu-63/curl-wont-work-on-10-04-1-lts-but-works-on-9-10-a-831519/"
miguel@quadbit:~$ USERID="marozsas"
miguel@quadbit:~$ PASSWORD="snip"
miguel@quadbit:~$ curl -b "uid=$USERID; pass=$PASSWORD"   -F "usenfo=1" -F "descr= "  -H "Expect:" $TAKEUPLOAD -D "/tmp/tmp.txt" | head
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
118   237    0     0  118   237      0    233  0:00:01  0:00:01 --:--:--   233<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
<base href="http://www.linuxquestions.org/questions/" /><!--[if IE]></base><![endif]-->
	<link rel="canonical" href="http://www.linuxquestions.org/questions/ubuntu-63/curl-wont-work-on-10-04-1-lts-but-works-on-9-10-a-831519/" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="generator" content="vBulletin 3.8.6" />

<meta name="keywords" content="Curl,won,t,work,10,04,1,LTS,but,works,9,10, Curl won't work on 10.04.1 LTS, but works on 9.10, Linux,how to,tutorial,operating system,linux,red hat,mandrake,security,linux help,installation,question,forum" />
...
...
so, I don't think there is something wrong with curl itself.

Try to use it in an interactive shell and try to cut unnecessary arguments where is possible.
 
  


Reply

Tags
curl, lts, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No enough space error when trying upgrade ubuntu from 8.04 lts to 10.04 lts flik shen Ubuntu 5 06-15-2010 12:44 PM
Curl utility doesnt work on freebsd crontab. Vimuth *BSD 3 05-12-2010 03:40 AM
How to get beacon GPS tracking uint to work with Ubuntu 8.04 lts craftsman Linux - Newbie 0 06-07-2009 04:44 AM
cURL: Server has many IPs, how would I make a cURL script use those IPs to send data? guest Programming 0 04-12-2009 07:44 PM
LXer: I update Ubuntu 6.06 LTS and 8.04 LTS ... one has SSH issues, one does not LXer Syndicated Linux News 0 05-20-2008 07:30 AM


All times are GMT -5. The time now is 08:32 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration