Compiling php with curl, where is curl installed?

后端 未结 5 1024
忘掉有多难
忘掉有多难 2020-12-24 00:42

I need to specify a directory when compiling php with --with-curl=

The curl binary is located at /usr/bin/curl

curl -V

5条回答
  •  一个人的身影
    2020-12-24 01:31

    For Ubuntu 17.0 +

    Adding to @netcoder answer above, If you are using Ubuntu 17+, installing libcurl header files is half of the solution. The installation path in ubuntu 17.0+ is different than the installation path in older Ubuntu version. After installing libcurl, you will still get the "cURL not found" error. You need to perform one extra step (as suggested by @minhajul in the OP comment section).

    Add a symlink in /usr/include of the cURL installation folder (cURL installation path in Ubuntu 17.0.4 is /usr/include/x86_64-linux-gnu/curl).

    My server was running Ubuntu 17.0.4, the commands to enable cURL support were

    sudo apt-get install libcurl4-gnutls-dev
    

    Then create a link to cURL installation

    cd /usr/include
    sudo ln -s x86_64-linux-gnu/curl
    

提交回复
热议问题