PECL Install Error

0

Hi, everyone.

I have followed this tutorial to install a PHP Zip extension: https://linux.how2shout.com/how-to-install-php-zip-module-on-amazon-linux-2023/

But when I run the command, sudo pecl install zip, I get the error.

No releases available for package "pecl.php.net/zip" install failed.

I did tried to clear the cache command,

pear upgrade pecl upgrade pecl channel-update

however, the connection timed out every time.

Any help would be greatly appreciated. Thank you.

2 Respuestas
0
Respuesta aceptada

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
AWS
EXPERTO
Mike_L
respondido hace 9 meses
  • I've disabled the IPv6 connection via the Security Group for the EC2 instance and it worked perfectly! Thanks, Mike!

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?

profile pictureAWS
EXPERTO
kentrad
respondido hace 9 meses
  • it's in a public subnet with internet access. when pecl is run, the error is No releases available for package.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas