0

I have libcurl installed here:

/usr/local/curl-7.88.1/

I want to compile php-curl extension:

# cd /usr/src/php-8.1.12/ext/curl/

# /usr/local/php81/bin/phpize
Configuring for:
PHP Api Version:         20210902
Zend Module Api No:      20210902
Zend Extension Api No:   420210902

# ./configure --with-php-config=/usr/local/php81/bin/php-config --with-curl=/usr/local/curl-7.88.1/
...
checking for cURL support... yes, shared
checking for libcurl >= 7.29.0... no
configure: error: Package requirements (libcurl >= 7.29.0) were not met:

No package 'libcurl' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CURL_CFLAGS
and CURL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

I tried several workarounds, including setting CFLAGS and LDFLAGS, but result is the same.

If I install yum install libcurl-devel, it ignores --with-curl=/usr/local/curl-7.88.1/ and works with the system libcurl (old version).

1 Answer 1

0

I was made possible to compile using following flags

export CFLAGS="-std=c99"
export MYCDIR=/usr/local/curl-7.88.1
export CURL_CFLAGS=-I$MYCDIR/include
export CURL_LIBS="-L$MYCDIR/lib -lcurl"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .