Compiling php with curl, where is curl installed?

后端 未结 5 1023
忘掉有多难
忘掉有多难 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:34

    php curl lib is just a wrapper of cUrl, so, first of all, you should install cUrl. Download the cUrl source to your linux server. Then, use the follow commands to install:

    tar zxvf cUrl_src_taz
    cd cUrl_src_taz
    ./configure --prefix=/curl/install/home
    make
    make test    (optional)
    make install
    ln -s  /curl/install/home/bin/curl-config /usr/bin/curl-config
    

    Then, copy the head files in the "/curl/install/home/include/" to "/usr/local/include". After all above steps done, the php curl extension configuration could find the original curl, and you can use the standard php extension method to install php curl.
    Hope it helps you, :)

提交回复
热议问题