Attempting to install pecl_http using Apache 2.0 & PHP 8.0.8 on Amazon Linux 2 AMI.
Full install below:
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo yum install php-pear
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Package 1:php-pear-1.10.12-9.amzn2.noarch already installed and latest version
Nothing to do
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo yum install gcc
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:7.3.1-13.amzn2 will be installed
--> Processing Dependency: cpp = 7.3.1-13.amzn2 for package: gcc-7.3.1-13.amzn2.x86_64
--> Processing Dependency: libsanitizer >= 7.3.1-13.amzn2 for package: gcc-7.3.1-13.amzn2.x86_64
--> Processing Dependency: libquadmath >= 7.3.1-13.amzn2 for package: gcc-7.3.1-13.amzn2.x86_64
--> Processing Dependency: libmpx >= 7.3.1-13.amzn2 for package: gcc-7.3.1-13.amzn2.x86_64
--> Processing Dependency: libitm >= 7.3.1-13.amzn2 for package: gcc-7.3.1-13.amzn2.x86_64
--> Processing Dependency: libcilkrts >= 7.3.1-13.amzn2 for package: gcc-7.3.1-13.amzn2.x86_64
--> Processing Dependency: libatomic >= 7.3.1-13.amzn2 for package: gcc-7.3.1-13.amzn2.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-7.3.1-13.amzn2.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-7.3.1-13.amzn2.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-7.3.1-13.amzn2.x86_64
--> Running transaction check
---> Package cpp.x86_64 0:7.3.1-13.amzn2 will be installed
---> Package glibc-devel.x86_64 0:2.26-54.amzn2 will be installed
--> Processing Dependency: glibc-headers = 2.26-54.amzn2 for package: glibc-devel-2.26-54.amzn2.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.26-54.amzn2.x86_64
---> Package libatomic.x86_64 0:7.3.1-13.amzn2 will be installed
---> Package libcilkrts.x86_64 0:7.3.1-13.amzn2 will be installed
---> Package libitm.x86_64 0:7.3.1-13.amzn2 will be installed
---> Package libmpc.x86_64 0:1.0.1-3.amzn2.0.2 will be installed
---> Package libmpx.x86_64 0:7.3.1-13.amzn2 will be installed
---> Package libquadmath.x86_64 0:7.3.1-13.amzn2 will be installed
---> Package libsanitizer.x86_64 0:7.3.1-13.amzn2 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.amzn2.0.2 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.26-54.amzn2 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.26-54.amzn2.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.26-54.amzn2.x86_64
--> Running transaction check
---> Package kernel-headers.x86_64 0:4.14.246-187.474.amzn2 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================
Package Arch Version Repository Size
===================================================================================
Installing:
gcc x86_64 7.3.1-13.amzn2 amzn2-core 22 M
Installing for dependencies:
cpp x86_64 7.3.1-13.amzn2 amzn2-core 9.2 M
glibc-devel x86_64 2.26-54.amzn2 amzn2-core 993 k
glibc-headers x86_64 2.26-54.amzn2 amzn2-core 514 k
kernel-headers x86_64 4.14.246-187.474.amzn2 amzn2-core 1.1 M
libatomic x86_64 7.3.1-13.amzn2 amzn2-core 46 k
libcilkrts x86_64 7.3.1-13.amzn2 amzn2-core 85 k
libitm x86_64 7.3.1-13.amzn2 amzn2-core 84 k
libmpc x86_64 1.0.1-3.amzn2.0.2 amzn2-core 52 k
libmpx x86_64 7.3.1-13.amzn2 amzn2-core 51 k
libquadmath x86_64 7.3.1-13.amzn2 amzn2-core 189 k
libsanitizer x86_64 7.3.1-13.amzn2 amzn2-core 641 k
mpfr x86_64 3.1.1-4.amzn2.0.2 amzn2-core 208 k
Transaction Summary
===================================================================================
Install 1 Package (+12 Dependent packages)
Total download size: 35 M
Installed size: 95 M
Is this ok [y/d/N]: y
Downloading packages:
(1/13): cpp-7.3.1-13.amzn2.x86_64.rpm | 9.2 MB 00:00:00
(2/13): glibc-devel-2.26-54.amzn2.x86_64.rpm | 993 kB 00:00:00
(3/13): glibc-headers-2.26-54.amzn2.x86_64.rpm | 514 kB 00:00:00
(4/13): kernel-headers-4.14.246-187.474.amzn2.x86_64.rpm | 1.1 MB 00:00:00
(5/13): libatomic-7.3.1-13.amzn2.x86_64.rpm | 46 kB 00:00:00
(6/13): libcilkrts-7.3.1-13.amzn2.x86_64.rpm | 85 kB 00:00:00
(7/13): libitm-7.3.1-13.amzn2.x86_64.rpm | 84 kB 00:00:00
(8/13): libmpc-1.0.1-3.amzn2.0.2.x86_64.rpm | 52 kB 00:00:00
(9/13): libmpx-7.3.1-13.amzn2.x86_64.rpm | 51 kB 00:00:00
(10/13): libquadmath-7.3.1-13.amzn2.x86_64.rpm | 189 kB 00:00:00
(11/13): gcc-7.3.1-13.amzn2.x86_64.rpm | 22 MB 00:00:00
(12/13): libsanitizer-7.3.1-13.amzn2.x86_64.rpm | 641 kB 00:00:00
(13/13): mpfr-3.1.1-4.amzn2.0.2.x86_64.rpm | 208 kB 00:00:00
---------------------------------------------
Total 41 MB/s | 35 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mpfr-3.1.1-4.amzn2.0.2.x86_64 1/13
Installing : libmpc-1.0.1-3.amzn2.0.2.x86_64 2/13
Installing : cpp-7.3.1-13.amzn2.x86_64 3/13
Installing : libitm-7.3.1-13.amzn2.x86_64 4/13
Installing : libmpx-7.3.1-13.amzn2.x86_64 5/13
Installing : kernel-headers-4.14.246-187.474.amzn2.x86_64 6/13
Installing : glibc-headers-2.26-54.amzn2.x86_64 7/13
Installing : glibc-devel-2.26-54.amzn2.x86_64 8/13
Installing : libcilkrts-7.3.1-13.amzn2.x86_64 9/13
Installing : libquadmath-7.3.1-13.amzn2.x86_64 10/13
Installing : libsanitizer-7.3.1-13.amzn2.x86_64 11/13
Installing : libatomic-7.3.1-13.amzn2.x86_64 12/13
Installing : gcc-7.3.1-13.amzn2.x86_64 13/13
Verifying : libatomic-7.3.1-13.amzn2.x86_64 1/13
Verifying : libsanitizer-7.3.1-13.amzn2.x86_64 2/13
Verifying : libquadmath-7.3.1-13.amzn2.x86_64 3/13
Verifying : gcc-7.3.1-13.amzn2.x86_64 4/13
Verifying : libcilkrts-7.3.1-13.amzn2.x86_64 5/13
Verifying : cpp-7.3.1-13.amzn2.x86_64 6/13
Verifying : glibc-devel-2.26-54.amzn2.x86_64 7/13
Verifying : kernel-headers-4.14.246-187.474.amzn2.x86_64 8/13
Verifying : libmpx-7.3.1-13.amzn2.x86_64 9/13
Verifying : libmpc-1.0.1-3.amzn2.0.2.x86_64 10/13
Verifying : libitm-7.3.1-13.amzn2.x86_64 11/13
Verifying : mpfr-3.1.1-4.amzn2.0.2.x86_64 12/13
Verifying : glibc-headers-2.26-54.amzn2.x86_64 13/13
Installed:
gcc.x86_64 0:7.3.1-13.amzn2
Dependency Installed:
cpp.x86_64 0:7.3.1-13.amzn2
glibc-devel.x86_64 0:2.26-54.amzn2
glibc-headers.x86_64 0:2.26-54.amzn2
kernel-headers.x86_64 0:4.14.246-187.474.amzn2
libatomic.x86_64 0:7.3.1-13.amzn2
libcilkrts.x86_64 0:7.3.1-13.amzn2
libitm.x86_64 0:7.3.1-13.amzn2
libmpc.x86_64 0:1.0.1-3.amzn2.0.2
libmpx.x86_64 0:7.3.1-13.amzn2
libquadmath.x86_64 0:7.3.1-13.amzn2
libsanitizer.x86_64 0:7.3.1-13.amzn2
mpfr.x86_64 0:3.1.1-4.amzn2.0.2
Complete!
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo yum install php-devel
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Existing lock /var/run/yum.pid: another copy is running as pid 3353.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 152 M RSS (369 MB VSZ)
Started: Thu Sep 30 03:31:16 2021 - 00:04 ago
State : Running, pid: 3353
Resolving Dependencies
--> Running transaction check
---> Package php-devel.x86_64 0:8.0.8-1.amzn2 will be installed
--> Processing Dependency: automake for package: php-devel-8.0.8-1.amzn2.x86_64
--> Processing Dependency: autoconf for package: php-devel-8.0.8-1.amzn2.x86_64
--> Running transaction check
---> Package autoconf.noarch 0:2.69-11.amzn2 will be installed
--> Processing Dependency: m4 >= 1.4.14 for package: autoconf-2.69-11.amzn2.noarch
--> Processing Dependency: perl(Data::Dumper) for package: autoconf-2.69-11.amzn2.noarch
---> Package automake.noarch 0:1.13.4-3.1.amzn2 will be installed
--> Processing Dependency: perl(Thread::Queue) for package: automake-1.13.4-3.1.amzn2.noarch
--> Processing Dependency: perl(TAP::Parser) for package: automake-1.13.4-3.1.amzn2.noarch
--> Running transaction check
---> Package m4.x86_64 0:1.4.16-10.amzn2.0.2 will be installed
---> Package perl-Data-Dumper.x86_64 0:2.145-3.amzn2.0.2 will be installed
---> Package perl-Test-Harness.noarch 0:3.28-3.amzn2 will be installed
---> Package perl-Thread-Queue.noarch 0:3.02-2.amzn2 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================
Package Arch Version Repository Size
===================================================================================
Installing:
php-devel x86_64 8.0.8-1.amzn2 amzn2extra-php8.0 1.3 M
Installing for dependencies:
autoconf noarch 2.69-11.amzn2 amzn2-core 701 k
automake noarch 1.13.4-3.1.amzn2 amzn2-core 679 k
m4 x86_64 1.4.16-10.amzn2.0.2 amzn2-core 256 k
perl-Data-Dumper x86_64 2.145-3.amzn2.0.2 amzn2-core 48 k
perl-Test-Harness noarch 3.28-3.amzn2 amzn2-core 302 k
perl-Thread-Queue noarch 3.02-2.amzn2 amzn2-core 17 k
Transaction Summary
===================================================================================
Install 1 Package (+6 Dependent packages)
Total download size: 3.3 M
Installed size: 16 M
Is this ok [y/d/N]: y
Downloading packages:
(1/7): autoconf-2.69-11.amzn2.noarch.rpm | 701 kB 00:00:00
(2/7): automake-1.13.4-3.1.amzn2.noarch.rpm | 679 kB 00:00:00
(3/7): m4-1.4.16-10.amzn2.0.2.x86_64.rpm | 256 kB 00:00:00
(4/7): perl-Data-Dumper-2.145-3.amzn2.0.2.x86_64.rpm | 48 kB 00:00:00
(5/7): perl-Thread-Queue-3.02-2.amzn2.noarch.rpm | 17 kB 00:00:00
(6/7): perl-Test-Harness-3.28-3.amzn2.noarch.rpm | 302 kB 00:00:00
(7/7): php-devel-8.0.8-1.amzn2.x86_64.rpm | 1.3 MB 00:00:00
---------------------------------------------
Total 8.3 MB/s | 3.3 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : m4-1.4.16-10.amzn2.0.2.x86_64 1/7
Installing : perl-Test-Harness-3.28-3.amzn2.noarch 2/7
Installing : perl-Thread-Queue-3.02-2.amzn2.noarch 3/7
Installing : perl-Data-Dumper-2.145-3.amzn2.0.2.x86_64 4/7
Installing : autoconf-2.69-11.amzn2.noarch 5/7
Installing : automake-1.13.4-3.1.amzn2.noarch 6/7
Installing : php-devel-8.0.8-1.amzn2.x86_64 7/7
Verifying : automake-1.13.4-3.1.amzn2.noarch 1/7
Verifying : perl-Data-Dumper-2.145-3.amzn2.0.2.x86_64 2/7
Verifying : perl-Thread-Queue-3.02-2.amzn2.noarch 3/7
Verifying : perl-Test-Harness-3.28-3.amzn2.noarch 4/7
Verifying : autoconf-2.69-11.amzn2.noarch 5/7
Verifying : m4-1.4.16-10.amzn2.0.2.x86_64 6/7
Verifying : php-devel-8.0.8-1.amzn2.x86_64 7/7
Installed:
php-devel.x86_64 0:8.0.8-1.amzn2
Dependency Installed:
autoconf.noarch 0:2.69-11.amzn2
automake.noarch 0:1.13.4-3.1.amzn2
m4.x86_64 0:1.4.16-10.amzn2.0.2
perl-Data-Dumper.x86_64 0:2.145-3.amzn2.0.2
perl-Test-Harness.noarch 0:3.28-3.amzn2
perl-Thread-Queue.noarch 0:3.02-2.amzn2
Complete!
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo yum install zlib-devel
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package zlib-devel.x86_64 0:1.2.7-18.amzn2 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================
Package Arch Version Repository Size
===================================================================================
Installing:
zlib-devel x86_64 1.2.7-18.amzn2 amzn2-core 50 k
Transaction Summary
===================================================================================
Install 1 Package
Total download size: 50 k
Installed size: 132 k
Is this ok [y/d/N]: y
Downloading packages:
zlib-devel-1.2.7-18.amzn2.x86_64.rpm | 50 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : zlib-devel-1.2.7-18.amzn2.x86_64 1/1
Verifying : zlib-devel-1.2.7-18.amzn2.x86_64 1/1
Installed:
zlib-devel.x86_64 0:1.2.7-18.amzn2
Complete!
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo yum install pcre-devel
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package pcre-devel.x86_64 0:8.32-17.amzn2.0.2 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================
Package Arch Version Repository Size
===================================================================================
Installing:
pcre-devel x86_64 8.32-17.amzn2.0.2 amzn2-core 480 k
Transaction Summary
===================================================================================
Install 1 Package
Total download size: 480 k
Installed size: 1.4 M
Is this ok [y/d/N]: y
Downloading packages:
pcre-devel-8.32-17.amzn2.0.2.x86_64.rpm | 480 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : pcre-devel-8.32-17.amzn2.0.2.x86_64 1/1
Verifying : pcre-devel-8.32-17.amzn2.0.2.x86_64 1/1
Installed:
pcre-devel.x86_64 0:8.32-17.amzn2.0.2
Complete!
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo pecl channel-update pecl.php.net
Updating channel "pecl.php.net"
Update of Channel "pecl.php.net" succeeded
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo pecl install pecl_http
downloading pecl_http-4.2.1.tgz ...
Starting to download pecl_http-4.2.1.tgz (224,452 bytes)
...............................................done: 224,452 bytes
86 source files, building
running: phpize
Configuring for:
PHP Api Version: 20200930
Zend Module Api No: 20200930
Zend Extension Api No: 420200930
where to find zlib [/usr] :
where to find libcurl [/usr] :
where to find libevent [/usr] :
where to find libicu [/usr] :
where to find libidn2 [/usr] :
where to find libidn [/usr] :
where to find libidnkit2 [/usr] :
where to find libidnkit [/usr] :
building in /var/tmp/pear-build-rootv7yNP4/pecl_http-4.2.1
running: /var/tmp/pecl_http/configure --with-php-config=/bin/php-config --with-http-zlib-dir=/usr --with-http-libcurl-dir=/usr --with-http-libevent-dir=/usr --with-http-libicu-dir=/usr --with-http-libidn2-dir=/usr --with-http-libidn-dir=/usr --with-http-libidnkit2-dir=/usr --with-http-libidnkit-dir=/usr
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /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 system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
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 PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking whether to enable extended HTTP support... yes, shared
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 for off_t... yes
checking for mbstate_t... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking for gethostname... yes
checking for getdomainname... yes
checking for mbrtowc... yes
checking for mbtowc... yes
checking for iswalnum... yes
checking for inet_pton... yes
checking whether/where to check for zlib... yes, shared
checking for gawk... (cached) gawk
checking for zlib... 1.2.7
checking whether zlib version 1.2.7 >= 1.2.0.4... ok
checking whether zlib can be linked... yes
checking whether/where to check for libbrotli... yes, shared
checking for libbrotlicommon... no
checking whether libbrotlicommon version >= 1.0... no
checking for libbrotlidec... no
checking whether libbrotlidec version >= 1.0... no
checking for libbrotlienc... no
checking whether libbrotlienc version >= 1.0... no
checking whether/where to check for libcurl... yes, shared
checking for a sed that does not truncate output... (cached) /bin/sed
checking for egrep... (cached) /bin/grep -E
checking for curl-config... false
checking for libcurl... no
checking whether libcurl version >= 7.18.2... configure: error: no
ERROR: `/var/tmp/pecl_http/configure --with-php-config=/bin/php-config --with-http-zlib-dir=/usr --with-http-libcurl-dir=/usr --with-http-libevent-dir=/usr --with-http-libicu-dir=/usr --with-http-libidn2-dir=/usr --with-http-libidn-dir=/usr --with-http-libidnkit2-dir=/usr --with-http-libidnkit-dir=/usr' failed
Judging by the error above I imagine the problem is leaving the below blank, however not sure what to actually enter into them... Any help is greatly appreciated.
where to find zlib [/usr] :
where to find libcurl [/usr] :
where to find libevent [/usr] :
where to find libicu [/usr] :
where to find libidn2 [/usr] :
where to find libidn [/usr] :
where to find libidnkit2 [/usr] :
where to find libidnkit [/usr] :