Find path to cURL?

0

My phpinfo(); shows cURL is installed on the server but when I use the command /usr/bin/curl it returns /bin/sh: 1: /usr/bin/curl: not found.

Now when I type which curl, it doesn't return anything.

Any ideas how to properly find path to cURL?

IMB

Posted 2018-07-31T16:19:45.723

Reputation: 4 845

Did you try whereis curl? – SpiderPig – 2018-07-31T16:32:43.703

@SpiderPig typing whereis curl returns: curl: It doesn't seem to look like a path? – IMB – 2018-07-31T16:33:59.107

Note that there are curl and libcurl packages. Perhaps libcurl is installed but curl itself is not. What does apt list --installed | grep curl show? – glenn jackman – 2018-07-31T16:56:21.447

Hmmm... it says this things are installed: libcurl3/oldstable php-curl/jessie php5-curl/oldstable php7.0-curl/jessie – IMB – 2018-07-31T17:07:23.313

@glennjackman I went ahead and installed curl it does seem I've mistaken libcurl for curl. You can create an answer and I'll accept. – IMB – 2018-07-31T17:11:47.433

As this answer states, the Curl library that PHP uses—and is reflected in phpinfo()—ha utterly nothing to do with the command line version of Curl.

– JakeGould – 2019-08-31T03:38:25.493

1I'm voting to close this question as off-topic because the question was self-solved a year or so ago as indicated in the comments: The user had to simply install the command line curl to get things working. They mistook the Curl library that PHP uses from command line Curl. – JakeGould – 2019-08-31T03:39:45.497

Answers

4

The /usr/bin/curl commandline executable is not the same as the php-curl library.

Both link to libcurl.so, the DLL/shared library which provides the functionality under the hood.

But you would need to install the curl package to get the CLI binary.

nyov

Posted 2018-07-31T16:19:45.723

Reputation: 229