Find path to cURL?

15,157

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.

Share:
15,157

Related videos on Youtube

IMB
Author by

IMB

Updated on September 18, 2022

Comments

  • IMB
    IMB over 1 year

    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?

    • SpiderPig
      SpiderPig almost 6 years
      Did you try whereis curl?
    • IMB
      IMB almost 6 years
      @SpiderPig typing whereis curl returns: curl: It doesn't seem to look like a path?
    • glenn jackman
      glenn jackman almost 6 years
      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?
    • IMB
      IMB almost 6 years
      Hmmm... it says this things are installed: libcurl3/oldstable php-curl/jessie php5-curl/oldstable php7.0-curl/jessie
    • IMB
      IMB almost 6 years
      @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.
    • Giacomo1968
      Giacomo1968 over 4 years
      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.
    • Giacomo1968
      Giacomo1968 over 4 years
      I'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.