LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-07-2018, 04:38 PM   #1
kenax
Member
 
Registered: Jan 2018
Location: Philippines
Distribution: Mint
Posts: 80

Rep: Reputation: Disabled
No command 'curl' found


I'm setting up a system to send out mass mailings, I followed their instructions and got the following error message (together with the command):

Quote:
curl -s --user 'api:_x_' \
> https://api.mailgun.net/v3/blast.kenax.net/messages \
> -F from='Excited User <mailgun@blast.kenax.net>' \
> -F to=blast@kenax.net \
> -F subject='Hello' \
> -F text='Testing some Mailgun awesomeness!'
No command 'curl' found, did you mean:
Command 'curl' from package 'curl' (main)
curl: command not found
Here are their instructions:

Quote:
curl -s --user 'api:YOUR_API_KEY' \
https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages \
-F from='Excited User <mailgun@YOUR_DOMAIN_NAME>' \
-F to=YOU@YOUR_DOMAIN_NAME \
-F to=bar@example.com \
-F subject='Hello' \
-F text='Testing some Mailgun awesomeness!'
Never used curl before, did some research, but the following is working:

Quote:
curl -O http://page.html
It correctly saves that webpage to my computer.

I tried sudo apt-get curl but it said I already have the latest curl on my system. I also recently updated all software on my computer. I am using Mint 18.2 Cinammon 16.4 bit. Thank you.
 
Old 08-07-2018, 06:03 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,812

Rep: Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281
The program is apparently not in your $PATH. Try providing the absolute path...
Code:
/bin/curl -s --user 'api:_x_' \
...
 
Old 08-07-2018, 06:17 PM   #3
kenax
Member
 
Registered: Jan 2018
Location: Philippines
Distribution: Mint
Posts: 80

Original Poster
Rep: Reputation: Disabled
tried that but it said "no such file or directory". I actually checked out the bin folder, also in the admin account (for security reasons I usually work in the regular user account) and did not find any curl in filesystem/bin, even no rendition of when running a search for "curl".

note that the mail gets sent from another server and I am only connecting to it, giving the command to send. the '_x_' is just my replacement of the actual api code.
 
Old 08-07-2018, 06:53 PM   #4
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,812

Rep: Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281
You're first going to have to find out where curl actually is...try
Code:
which curl
'tho you did say curl worked with for another page/site.
 
Old 08-07-2018, 06:57 PM   #5
kenax
Member
 
Registered: Jan 2018
Location: Philippines
Distribution: Mint
Posts: 80

Original Poster
Rep: Reputation: Disabled
hmm, maybe I solved it by accident. did a command curl --help and saw that -s may have been silent with no output, so I just tried to remove it and it seems to work now! too bad the support from this mail server is so poor, but their price is good
 
Old 08-07-2018, 07:02 PM   #6
kenax
Member
 
Registered: Jan 2018
Location: Philippines
Distribution: Mint
Posts: 80

Original Poster
Rep: Reputation: Disabled
tried that but then got error message

bash: usr/bin/curl: No such file or directory

but my above solution actually did something. will continue to play around with and if i get it working will mark this as solved. thanks for your tips!
 
Old 08-07-2018, 07:19 PM   #7
kenax
Member
 
Registered: Jan 2018
Location: Philippines
Distribution: Mint
Posts: 80

Original Poster
Rep: Reputation: Disabled
on the mail server side it said that the message i tried to send was "dropped". perhaps authentication did not work properly when i dropped the -s? when i run curl --help, it shows an -s section but no --user after it. maybe that is why it says it could not find the command? should i consider downloading a more robust version of curl and manually installing it on my system, even though when i checked it said i already had the latest version of curl installed?
 
Old 08-07-2018, 07:35 PM   #8
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,812

Rep: Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281
Quote:
Originally Posted by kenax View Post
tried that but then got error message

bash: usr/bin/curl: No such file or directory
That was the response to which curl ??
 
Old 08-07-2018, 07:43 PM   #9
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,812

Rep: Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281
Quote:
Originally Posted by kenax View Post
on the mail server side it said that the message i tried to send was "dropped". perhaps authentication did not work properly when i dropped the -s? when i run curl --help, it shows an -s section but no --user after it. maybe that is why it says it could not find the command? should i consider downloading a more robust version of curl and manually installing it on my system, even though when i checked it said i already had the latest version of curl installed?
It may be time to go to mailgun support to see what version of curl they recommend/require

What version are you running?
Code:
curl -V
I don't see a --user option on my curl (curl 7.29.0), either
Edit: Oh...it's a long version of the -u option...apparently the user is somehow encoded in the api URL, which you're not (and shouldn't be) sharing.

Last edited by scasey; 08-07-2018 at 08:10 PM.
 
Old 08-07-2018, 09:07 PM   #10
kenax
Member
 
Registered: Jan 2018
Location: Philippines
Distribution: Mint
Posts: 80

Original Poster
Rep: Reputation: Disabled
i tried curl -v and got the response

curl: no URL specified!

when i look at the software manager it says
Version: 7.47.0-1ubuntu2.8

when i look online i see curl 7.61.0 is available. am i gonna screw up my system if i try to install that manually? i tried the sudo get/update thing and it already said i had the latest version.

i know about the api authentication, which why i replaced the code with _x_
 
Old 08-07-2018, 09:08 PM   #11
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,642

Rep: Reputation: 277Reputation: 277Reputation: 277
sudo apt-get install curl
check out this link: https://stackoverflow.com/questions/...-curl-on-linux
 
Old 08-07-2018, 09:13 PM   #12
kenax
Member
 
Registered: Jan 2018
Location: Philippines
Distribution: Mint
Posts: 80

Original Poster
Rep: Reputation: Disabled
yup, already tried that:

Reading package lists... Done
Building dependency tree
Reading state information... Done
curl is already the newest version (7.47.0-1ubuntu2.8).
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.

will check out your article
 
Old 08-07-2018, 09:17 PM   #13
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,812

Rep: Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281Reputation: 1281
Quote:
Originally Posted by kenax View Post
i tried curl -v and got the response

curl: no URL specified!

when i look at the software manager it says
Version: 7.47.0-1ubuntu2.8

when i look online i see curl 7.61.0 is available. am i gonna screw up my system if i try to install that manually? i tried the sudo get/update thing and it already said i had the latest version.

i know about the api authentication, which why i replaced the code with _x_
That’s a capital -V !!

Contact support?
 
Old 08-07-2018, 09:19 PM   #14
kenax
Member
 
Registered: Jan 2018
Location: Philippines
Distribution: Mint
Posts: 80

Original Poster
Rep: Reputation: Disabled
according to the article you suggested (discussion was closed), i tried

sudo apt-get install php-curl

it installed some stuff, but still getting the same error response. would it be a bad idea to manually install the latest version of curl (https://curl.haxx.se/download.html) in hopes that the -s --user command would be in there/working properly?
 
Old 08-07-2018, 09:23 PM   #15
kenax
Member
 
Registered: Jan 2018
Location: Philippines
Distribution: Mint
Posts: 80

Original Poster
Rep: Reputation: Disabled
oh, got it:

curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 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: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets

Support is not supporting me at all. mailgun has good prices so trying to figure this out myself.
 
  


Reply

Tags
curl


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
.bash_profile, "-bash: export: command not found" Squall90 Slackware 9 05-16-2012 03:45 PM
Queries on Curl command dhanesh.koliyat Linux - Newbie 1 10-11-2011 09:35 AM
using cURL from the command line lauram93 Linux - Software 4 06-05-2009 01:08 PM
Using Curl command backpackingbiker Ubuntu 1 06-21-2005 04:16 PM
lynx, curl, fopen bringing up a site when DNS not found? sornman Linux - General 0 10-14-2004 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:44 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration