2개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
It works for me. This is with PHP8.2 that comes with AL 2023
sh-5.2$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-01"
sh-5.2$ sudo pecl install zip
downloading zip-1.22.2.tgz ...
Starting to download zip-1.22.2.tgz (363,869 bytes)
..........................................................................done: 363,869 bytes
24 source files, building
running: phpize
Configuring for:
PHP Api Version: 20220829
Zend Module Api No: 20220829
Zend Extension Api No: 420220829
building in /var/tmp/pear-build-rootbcMaZH/zip-1.22.2
....
Build process completed successfully
Installing '/usr/lib64/php8.2/modules/zip.so'
install ok: channel://pecl.php.net/zip-1.22.2
configuration option "php_ini" is not set to php.ini location
You should add "extension=zip.so" to php.ini
Does your EC2 have IPv6 address assigned?
As per Request #71308 missing IPv6 support for pecl.php.net, it will not work if your EC2 instance has IPv6 address.
sh-5.2$ sudo pecl install zip
Could not get contents of package "/usr/bin/zip". Invalid tgz file.
install failed
0
Is the instance in a public subnet? If it is in a private subnet, is there a NAT gateway to allow the request to reach the internet?
it's in a public subnet with internet access. when pecl is run, the error is No releases available for package.
I've disabled the IPv6 connection via the Security Group for the EC2 instance and it worked perfectly! Thanks, Mike!