# Curl -o is not recongnized by root

**URL:** <https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737>\
**Category:** TMVA\
**Created:** [July 11, 2018, 9:09am UTC](https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737 "2018-07-11T09:09:50Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![XiaoyongHe](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/ac91a4/32.png) [@XiaoyongHe](https://root-forum.cern.ch/u/XiaoyongHe)\
**Post date:** [July 11, 2018, 9:09am UTC](https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737/1 "2018-07-11T09:09:50Z")

</div>

Dear community,

I am a new user in root / tmva. As I tried to run TMVAClassification in root under Windows, I got following message:  
“can not find command curl”  
It seems that the error happens at the statement :  
gSystem-\>Exec(“curl -O [http://root.cern.ch/files/tmva\_class\_example.root](http://root.cern.ch/files/tmva_class_example.root)”);  
Can any one help me to resolve the problem ?  
To work around the problem I tried to copy tmva\_class\_example.root to my local disk. (acturally it istmva\_example.root there.) But the newly established file is not readable by the program. Where can I get a corresponding working file ?  
Just to mention again that I am using root in Widows 7.

Thanks in advance !  
Xiaoyong

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [July 11, 2018, 9:16am UTC](https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737/2 "2018-07-11T09:16:14Z")

</div>

[curl -\> downloads](https://curl.haxx.se/download.html)

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [July 11, 2018, 9:20am UTC](https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737/3 "2018-07-11T09:20:02Z")

</div>

> [@XiaoyongHe](#):
>
> gSystem-\>Exec(“curl -O [http://root.cern.ch/files/tmva\_class\_example.root”](http://root.cern.ch/files/tmva_class_example.root%E2%80%9D));

The command you give as argument to gSystem-\>Exec is passed to the local operating system to be executed. ROOT does not check if the command exists or not. It is your responsibility to make sure the command is valid and exists. As Wile suggested you have to download it .

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [July 11, 2018, 9:23am UTC](https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737/4 "2018-07-11T09:23:17Z")

</div>

You can also just download the file and place it in a folder “./files/tmva\_class\_example.root” relative to the directory you run the script from.

TMVA first checks if the file is cached locally before trying to fetch it from the interweb. Thanks for reporting that this does not work out-of-the-box for windows!

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![XiaoyongHe](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/ac91a4/32.png) [@XiaoyongHe](https://root-forum.cern.ch/u/XiaoyongHe)\
**Post date:** [July 11, 2018, 9:44am UTC](https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737/6 "2018-07-11T09:44:02Z")

</div>

Dear Wile\_E\_Coyote, couet and kialbert

Thanks to your instant answers my question. I feel warm and welcomed here!

I have just installed the curl in bin directory and it seems there is no more trouble at this statement.

But I encountered another problem I got a following message: “ Failed to connect to root.cern.ch port 80: connection refused”  
I guess this is caused by my intranet or fire wall of the company. I am trying to resolve the problem  
or a local training file will get around the trouble. How can I download the file tmva\_esample.root from cern ? FTP ?

Regards

Xiaoyong

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [July 11, 2018, 9:50am UTC](https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737/7 "2018-07-11T09:50:05Z")

</div>

[Replace “http://” with “https://”.](https://root.cern.ch/files/)

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [July 11, 2018, 10:01am UTC](https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737/8 "2018-07-11T10:01:21Z")

</div>

Or click the link in your first post 😉

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![XiaoyongHe](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/ac91a4/32.png) [@XiaoyongHe](https://root-forum.cern.ch/u/XiaoyongHe)\
**Post date:** [July 11, 2018, 12:01pm UTC](https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737/9 "2018-07-11T12:01:06Z")

</div>

Dear Kim,

I didn’t realize there is a link in my first post.

You mentioned: „ You can also just download the file and place it in a folder “./files/tmva\_class\_example.root” relative to the directory you run the script from. “. Can you please kindly tell me where to download the toy training file for TMVAClassification ? Should I use FTP ? Does Cern has a FTP server ?

Thanks

XIaoyong

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [July 11, 2018, 12:08pm UTC](https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737/10 "2018-07-11T12:08:31Z")

</div>

For each file that you want to run, you can find the download location near the top of the file. Ofc, if you followed @Wile_E_Coyote’s suggestion you should be able to run the example directly.

The files are served by an ordinary webserver, hence you just need to paste the url in your browser.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![XiaoyongHe](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/ac91a4/32.png) [@XiaoyongHe](https://root-forum.cern.ch/u/XiaoyongHe)\
**Post date:** [July 11, 2018, 12:53pm UTC](https://root-forum.cern.ch/t/curl-o-is-not-recongnized-by-root/29737/11 "2018-07-11T12:53:36Z")

</div>

Thanks for mention me.

Instead IE I uased firefox. Then I got an option to store the file in firefox. Now it works. I wonder why IE does not give this option. I saw only junks from a bin file.
