Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails because libcurl not found while installed #144

Open
frntn opened this issue Dec 22, 2022 · 4 comments
Open

Install fails because libcurl not found while installed #144

frntn opened this issue Dec 22, 2022 · 4 comments

Comments

@frntn
Copy link

frntn commented Dec 22, 2022

What I do

On my WSL Ubuntu linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

$ uname -a
Linux LFR048888 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Trying to install latest php after installing asdf-php plugin

$ asdf plugin add php
$ asdf install php latest

What I expect

I expect php to be installed successfully

What I get

I get an error message about libcurl in the automake's ./configure step

checking for libcurl >= 7.29.0... no
configure: error: Package requirements (libcurl >= 7.29.0) were not met:
No package 'libcurl' found

But everything seems ok to me as I have the libcurl4-openssl-dev installed

$ dpkg -l | grep curl
ii  curl                                  7.68.0-1ubuntu2.14                  amd64        command line tool for transferring data with URL syntax
ii  libcurl3-gnutls:amd64                 7.68.0-1ubuntu2.12                  amd64        easy-to-use client-side URL transfer library (GnuTLS flavour)
ii  libcurl4:amd64                        7.68.0-1ubuntu2.14                  amd64        easy-to-use client-side URL transfer library (OpenSSL flavour)
ii  libcurl4-openssl-dev:amd64            7.68.0-1ubuntu2.14                  amd64        development files and documentation for libcurl (OpenSSL flavour)

I understand this may be an issue of the php source repo...

Details

Install logs

$ asdf install php latest
Determining configuration options...
Downloading source code...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 17.4M    0 17.4M    0     0  4295k      0 --:--:--  0:00:04 --:--:-- 5203k
Extracting source code...
Running buildconfig...
buildconf: Checking installation
buildconf: autoconf version 2.69 (ok)
buildconf: Forcing buildconf. The configure files will be regenerated.
buildconf: Cleaning cache and configure files
buildconf: Rebuilding configure
buildconf: Rebuilding main/php_config.h.in
buildconf: Run ./configure to proceed with customizing the PHP build.
Running ./configure --with-openssl --with-curl --with-zlib --with-readline --with-gettext --with-jpeg-dir=/usr/lib/x86_64-linux-gnu/libjpeg.so.8 --with-jpeg --prefix=/home/mfronton/.asdf/installs/php/8.2.0     --enable-bcmath     --enable-calendar     --enable-dba     --enable-exif     --enable-fpm     --enable-ftp     --enable-gd     --enable-gd-native-ttf     --enable-intl     --enable-mbregex     --enable-mbstring     --enable-mysqlnd     --enable-pcntl     --enable-shmop     --enable-soap     --enable-sockets     --enable-sysvmsg     --enable-sysvsem     --enable-sysvshm     --enable-wddx     --enable-zip     --sysconfdir=/home/mfronton/.asdf/installs/php/8.2.0     --with-config-file-path=/home/mfronton/.asdf/installs/php/8.2.0     --with-config-file-scan-dir=/home/mfronton/.asdf/installs/php/8.2.0/conf.d     --with-curl     --with-external-gd     --with-fpm-group=www-data     --with-fpm-user=www-data     --with-gd     --with-mhash     --with-mysql=mysqlnd     --with-mysqli=mysqlnd     --with-pdo-mysql=mysqlnd     --with-xmlrpc     --with-zip     --with-zlib     --without-snmp --with-pear --with-pdo-pgsql --without-pcre-jit
configure: WARNING: unrecognized options: --with-jpeg-dir, --enable-gd-native-ttf, --enable-wddx, --enable-zip, --with-gd, --with-mysql, --with-xmlrpc
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for pkg-config... /home/linuxbrew/.linuxbrew/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for cc option to accept ISO C99... none needed
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether ln -s works... yes
checking for system library directory... lib
checking whether to enable runpaths... yes
checking if compiler supports -Wl,-rpath,... yes
checking for gawk... gawk
checking for bison... bison
checking for bison version... 3.8.2 (ok)
checking for re2c... re2c
checking for re2c version... 1.3 (ok)
checking for php... no
checking whether to enable computed goto gcc extension with re2c... no
checking whether C compiler accepts -fvisibility=hidden... yes
checking whether to force non-PIC code in shared modules... no
checking whether we are using musl libc... no
checking whether to use -D_GNU_SOURCE cflag... yes
checking whether /dev/urandom exists... yes
checking for global register variables support... yes
checking whether __cpuid_count is available... yes
checking for pthreads_cflags... -pthread
checking for pthreads_lib... pthread

Configuring SAPI modules
checking for Apache 2 handler module support via DSO through APXS... no
checking for setproctitle... no
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking for PS_STRINGS... no
checking for CLI build... yes
checking for embedded SAPI library support... no
checking for FPM build... yes
checking for clearenv... yes
checking for setproctitle... (cached) no
checking for setproctitle_fast... no
checking for library containing socket... none required
checking for library containing inet_addr... none required
checking for prctl... yes
checking for procctl... no
checking for setpflags... no
checking for clock_gettime... yes
checking for ptrace... yes
checking whether ptrace works... yes
checking for proc mem file... mem
checking if gcc supports __sync_bool_compare_and_swap... yes
checking for TCP_INFO... yes
checking for TCP_CONNECTION_INFO... no
checking for sysconf... yes
checking for times... yes
checking for kqueue... no
checking for port framework... no
checking for /dev/poll... no
checking for epoll... yes
checking for select... yes
checking for clang fuzzer SAPI... no
checking for LiteSpeed support... no
checking for phpdbg support... yes
checking for phpdbg debug build... no
checking for phpdbg readline support... no
checking whether termios.h defines TIOCGWINSZ... no
checking whether sys/ioctl.h defines TIOCGWINSZ... yes
checking for phpdbg and readline integration... disabled
checking for userfaultfd faulting on write-protected memory support... no
checking for CGI build... yes
checking for sun_len in sys/un.h... no
checking whether cross-process locking is required by accept()... no
checking for chosen SAPI module... none
checking for executable SAPI binaries...  cli fpm phpdbg cgi

Running system checks
checking for sendmail... /usr/sbin/sendmail
checking whether system uses EBCDIC... no
checking whether byte ordering is bigendian... no
checking whether writing to stdout works... This is the test message -- yes
checking for socket... yes
checking for socketpair... yes
checking for htonl... yes
checking for gethostname... yes
checking for gethostbyaddr... yes
checking for dlopen... no
checking for __dlopen... no
checking for dlopen in -ldl... yes
checking for dlsym... yes
checking for sin in -lm... yes
checking for inet_aton... yes
checking for stdint.h... (cached) yes
checking for dirent.h... yes
checking for sys/param.h... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for netinet/in.h... yes
checking for alloca.h... yes
checking for arpa/inet.h... yes
checking for arpa/nameser.h... yes
checking for crypt.h... yes
checking for dns.h... no
checking for fcntl.h... yes
checking for grp.h... yes
checking for ieeefp.h... no
checking for langinfo.h... yes
checking for linux/filter.h... yes
checking for linux/sock_diag.h... yes
checking for malloc.h... yes
checking for os/signpost.h... no
checking for poll.h... yes
checking for pty.h... yes
checking for pwd.h... yes
checking for resolv.h... yes
checking for strings.h... (cached) yes
checking for syslog.h... yes
checking for sysexits.h... yes
checking for sys/ioctl.h... yes
checking for sys/file.h... yes
checking for sys/mman.h... yes
checking for sys/mount.h... yes
checking for sys/poll.h... yes
checking for sys/resource.h... yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking for sys/statfs.h... yes
checking for sys/statvfs.h... yes
checking for sys/vfs.h... yes
checking for sys/sysexits.h... no
checking for sys/uio.h... yes
checking for sys/wait.h... yes
checking for sys/loadavg.h... no
checking for unistd.h... (cached) yes
checking for unix.h... no
checking for utime.h... yes
checking for sys/utsname.h... yes
checking for sys/ipc.h... yes
checking for dlfcn.h... yes
checking for tmmintrin.h... yes
checking for nmmintrin.h... yes
checking for wmmintrin.h... yes
checking for immintrin.h... yes
checking for fopencookie... yes
checking for broken getcwd... no
checking for broken gcc optimize-strlen... no
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for missing declarations of reentrant functions... done
checking for fclose declaration... ok
checking for struct flock... yes
checking for socklen_t... yes
checking size of intmax_t... 8
checking size of ssize_t... 8
checking size of ptrdiff_t... 8
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of size_t... 8
checking size of off_t... 8
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for __builtin_expect... yes
checking for __builtin_clz... yes
checking for __builtin_clzl... yes
checking for __builtin_clzll... yes
checking for __builtin_ctzl... yes
checking for __builtin_ctzll... yes
checking for __builtin_smull_overflow... yes
checking for __builtin_smulll_overflow... yes
checking for __builtin_saddl_overflow... yes
checking for __builtin_saddll_overflow... yes
checking for __builtin_ssubl_overflow... yes
checking for __builtin_ssubll_overflow... yes
checking for __builtin_cpu_init... yes
checking for __builtin_cpu_supports... yes
checking whether the compiler supports __alignof__... yes
checking for struct tm.tm_gmtoff... yes
checking for struct stat.st_blksize... yes
checking for struct stat.st_rdev... yes
checking for struct stat.st_blocks... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for struct sockaddr_storage... yes
checking for field sa_len in struct sockaddr... no
checking for __attribute__((ifunc))... yes
checking for __attribute__((target))... yes
checking for IPv6 support... yes
checking for alphasort... yes
checking for asctime_r... yes
checking for chroot... yes
checking for ctime_r... yes
checking for explicit_memset... no
checking for fdatasync... yes
checking for flock... yes
checking for ftok... yes
checking for funopen... no
checking for gai_strerror... yes
checking for getcwd... yes
checking for getloadavg... yes
checking for getlogin... yes
checking for getprotobyname... yes
checking for getprotobynumber... yes
checking for getservbyname... yes
checking for getservbyport... yes
checking for getrusage... yes
checking for gettimeofday... yes
checking for gmtime_r... yes
checking for getpwnam_r... yes
checking for getgrnam_r... yes
checking for getpwuid_r... yes
checking for getwd... yes
checking for glob... yes
checking for inet_ntoa... yes
checking for inet_ntop... yes
checking for inet_pton... yes
checking for localtime_r... yes
checking for lchown... yes
checking for memcntl... no
checking for memmove... yes
checking for mkstemp... yes
checking for mmap... yes
checking for nice... yes
checking for nl_langinfo... yes
checking for poll... yes
checking for pthread_jit_write_protect_np... no
checking for putenv... yes
checking for scandir... yes
checking for setitimer... yes
checking for setenv... yes
checking for shutdown... yes
checking for sigprocmask... yes
checking for statfs... yes
checking for statvfs... yes
checking for std_syslog... no
checking for strcasecmp... yes
checking for strnlen... yes
checking for strptime... yes
checking for strtok_r... yes
checking for symlink... yes
checking for tzset... yes
checking for unsetenv... yes
checking for usleep... yes
checking for utime... yes
checking for vasprintf... yes
checking for asprintf... yes
checking for nanosleep... yes
checking for memmem... yes
checking for memrchr... yes
checking how many arguments gethostbyname_r() takes... six
checking for nanosleep in -lrt... yes
checking for setsockopt in -lnetwork... no
checking for __setsockopt in -lnetwork... no
checking for getaddrinfo... yes
checking for copy_file_range... yes
checking for strlcat... no
checking for strlcpy... no
checking for explicit_bzero... yes
checking for getopt... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for type of reentrant time-related functions... POSIX
checking for in_addr_t... yes
checking for aarch64 CRC32 API... no
checking for asm goto... yes
checking whether to enable valgrind support... yes
checking for valgrind... no
checking for openpty... no
checking for __openpty... no
checking for openpty in -lutil... yes

General settings
checking whether to include gcov symbols... no
checking whether to include debugging symbols... no
checking whether to enable debug assertions in release mode... no
checking whether to dlopen extensions with RTLD_NOW instead of RTLD_LAZY... no
checking layout of installed files... PHP
checking path to configuration file... /home/mfronton/.asdf/installs/php/8.2.0
checking where to scan for configuration files... /home/mfronton/.asdf/installs/php/8.2.0/conf.d
checking whether to enable PHP's own SIGCHLD handler... no
checking whether to explicitly link against libgcc... no
checking whether to enable short tags by default... yes
checking whether to enable dmalloc... no
checking whether to enable IPv6 support... yes
checking whether to enable DTrace support... no
checking how big to make fd sets... using system default

Configuring extensions
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking for strtoll... yes
checking for atoll... yes
checking whether to build with LIBXML support... yes
checking for libxml-2.0 >= 2.9.0... yes
checking for OpenSSL support... yes
checking for Kerberos support... no
checking whether to use system default cipher list instead of hardcoded value... no
checking for openssl >= 1.0.2... yes
checking for RAND_egd... no
checking for PCRE library to use... bundled
checking whether to enable PCRE JIT functionality... no
checking whether to enable the SQLite3 extension... yes
checking for sqlite3 >= 3.7.7... yes
checking for sqlite3_errstr in -lsqlite3... no
checking for sqlite3_expanded_sql in -lsqlite3... no
checking for sqlite3_load_extension in -lsqlite3... no
checking for ZLIB support... yes
checking for zlib >= 1.2.0.4... yes
checking whether to enable bc style precision math functions... yes
checking for BZip2 support... no
checking whether to enable calendar conversion support... yes
checking whether to enable ctype functions... yes
checking for cURL support... yes
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.
@otowa552
Copy link

I am in the same situation. Has this been resolved?

@99linesofcode
Copy link

curl is listed as one of the build dependencies. Make sure these packages are installed on your system:

https://github.com/asdf-community/asdf-php/blob/master/.github/workflows/workflow.yml#L30

@jakeklassen
Copy link

@99linesofcode I've installed the linked packages and have the same error still. Any other ideas what could be done?

Machine: Windows 11 (WSL2 - Ubuntu 22.04)

@redesigned
Copy link

After you install curl set the following environment variables:

export LDFLAGS="-L$HOME/homebrew/opt/curl/lib"
export CPPFLAGS="-I$HOME/homebrew/opt/curl/include"
export CURL_DIR="$HOME/homebrew/opt/curl/bin/curl"

Adjusting for wherever your curl is installed to. This is where mine was installed on MacOS and it got me past this issue.

I had to do the same for iconv:

export ICONV_DIR="/usr/bin/iconv"
export PHP_CONFIGURE_OPTIONS="$PHP_CONFIGURE_OPTIONS --with-iconv=/usr/bin/iconv"

Still fighting with zlib 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants