WWBN / AVideo-Encoder

Encoder Server for AVideo Platform Open-Source
https://platform.avideo.com
GNU Affero General Public License v3.0
152 stars 189 forks source link

Erro install Encoder - ZipArchive not available php8.3-zip #531

Closed gbrn closed 7 months ago

gbrn commented 7 months ago

@DanielnetoDotCom Danny, when installing the encoder, is showing the following message:

NULL The ZipArchive class is not available in the PHP CLI environment. The CLI is using PHP version 8.3. Please install the PHP Zip extension for this version. On Ubuntu, run: 'sudo apt install php8.3-zip && sudo /etc/init.d/apache2 restart

As you can see below, php8.3-zip is already installed:

ubuntu@ubuntu-server-arm-guibla:/etc/apache2$ sudo apt install php8.3-zip
Lendo listas de pacotes... Pronto
Construindo árvore de dependências... Pronto
Lendo informação de estado... Pronto
php8.3-zip is already the newest version (8.3.6-1+ubuntu22.04.1+deb.sury.org+1).
0 pacotes atualizados, 0 pacotes novos instalados, 0 a serem removidos e 3 não atualizados.
ubuntu@ubuntu-server-arm-guibla:/etc/apache2$

So I am unable to proceed with the installation, because of this error.

DanielnetoDotCom commented 7 months ago

Did you restart Apache after installing it?

gbrn commented 7 months ago

@DanielnetoDotCom That's certainly not the problem. Yes, full PHP installation was done well previously and restarted several times. Just to make sure, I completely removed PHP 8.3 and installed everything again.

ubuntu@ubuntu-server-arm-guibla:~$ sudo apt-get purge php8.3
Lendo listas de pacotes... Pronto
Construindo árvore de dependências... Pronto
Lendo informação de estado... Pronto
Os pacotes a seguir serão REMOVIDOS:
  php8.3*
0 pacotes atualizados, 0 pacotes novos instalados, 1 a serem removidos e 3 não atualizados.
Depois desta operação, 64,5 kB de espaço em disco serão liberados.
Você quer continuar? [S/n] s

I reinstalled the PHP 8.3 packages. Despite this entire procedure, the error is the same... would this be an incompatibility with PHP 8.3? Has this already been tested?

ubuntu@ubuntu-server-arm-guibla:~$ sudo apt-get install apache2 php8.3 libapache2-mod-php8.3 php8.3-mysql php8.3-curl php8.3-gd php8.3-intl php-zip php8.3-xml mysql-server mysql-client ffmpeg git libimage-exiftool-perl
Lendo listas de pacotes... Pronto
Construindo árvore de dependências... Pronto
Lendo informação de estado... Pronto
libimage-exiftool-perl is already the newest version (12.40+dfsg-1).
apache2 is already the newest version (2.4.52-1ubuntu4.9).
git is already the newest version (1:2.34.1-1ubuntu1.10).
mysql-client is already the newest version (8.0.36-0ubuntu0.22.04.1).
mysql-server is already the newest version (8.0.36-0ubuntu0.22.04.1).
ffmpeg is already the newest version (7:4.4.2-0ubuntu0.22.04.1).
Pacotes sugeridos:
  php-pear
Os NOVOS pacotes a seguir serão instalados:
  libapache2-mod-php8.3 php-common php-zip php8.3 php8.3-cli php8.3-common php8.3-curl php8.3-gd php8.3-intl php8.3-mysql php8.3-opcache php8.3-readline
  php8.3-xml php8.3-zip
0 pacotes atualizados, 14 pacotes novos instalados, 0 a serem removidos e 3 não atualizados.
É preciso baixar 5.509 kB/5.574 kB de arquivos.
Depois desta operação, 24,9 MB adicionais de espaço em disco serão usados.
Obter:1 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main arm64 php-common all 2:94+ubuntu22.04.1+deb.sury.org+2 [16,7 kB]
Obter:2 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main arm64 php8.3-common arm64 8.3.6-1+ubuntu22.04.1+deb.sury.org+1 [752 kB]
Obter:3 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main arm64 php8.3-opcache arm64 8.3.6-1+ubuntu22.04.1+deb.sury.org+1 [586 kB]
Obter:4 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main arm64 php8.3-readline arm64 8.3.6-1+ubuntu22.04.1+deb.sury.org+1 [12,9 kB]
Obter:5 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main arm64 php8.3-cli arm64 8.3.6-1+ubuntu22.04.1+deb.sury.org+1 [1.859 kB]
Obter:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main arm64 libapache2-mod-php8.3 arm64 8.3.6-1+ubuntu22.04.1+deb.sury.org+1 [1.801 kB]
Obter:7 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main arm64 php8.3-curl arm64 8.3.6-1+ubuntu22.04.1+deb.sury.org+1 [39,9 kB]
Obter:8 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main arm64 php8.3-gd arm64 8.3.6-1+ubuntu22.04.1+deb.sury.org+1 [31,5 kB]
Obter:9 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main arm64 php8.3-intl arm64 8.3.6-1+ubuntu22.04.1+deb.sury.org+1 [157 kB]
Obter:10 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main arm64 php8.3-mysql arm64 8.3.6-1+ubuntu22.04.1+deb.sury.org+1 [129 kB]
Obter:11 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main arm64 php8.3-xml arm64 8.3.6-1+ubuntu22.04.1+deb.sury.org+1 [124 kB]
Baixados 5.509 kB em 13s (413 kB/s)
A seleccionar pacote anteriormente não seleccionado php-common.
(Lendo banco de dados ... 273128 ficheiros e directórios actualmente instalados.)
A preparar para desempacotar .../00-php-common_2%3a94+ubuntu22.04.1+deb.sury.org+2_all.deb ...
A descompactar php-common (2:94+ubuntu22.04.1+deb.sury.org+2) ...
A seleccionar pacote anteriormente não seleccionado php8.3-common.
A preparar para desempacotar .../01-php8.3-common_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_arm64.deb ...
A descompactar php8.3-common (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A seleccionar pacote anteriormente não seleccionado php8.3-opcache.
A preparar para desempacotar .../02-php8.3-opcache_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_arm64.deb ...
A descompactar php8.3-opcache (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A seleccionar pacote anteriormente não seleccionado php8.3-readline.
A preparar para desempacotar .../03-php8.3-readline_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_arm64.deb ...
A descompactar php8.3-readline (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A seleccionar pacote anteriormente não seleccionado php8.3-cli.
A preparar para desempacotar .../04-php8.3-cli_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_arm64.deb ...
A descompactar php8.3-cli (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A seleccionar pacote anteriormente não seleccionado libapache2-mod-php8.3.
A preparar para desempacotar .../05-libapache2-mod-php8.3_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_arm64.deb ...
A descompactar libapache2-mod-php8.3 (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A seleccionar pacote anteriormente não seleccionado php8.3-zip.
A preparar para desempacotar .../06-php8.3-zip_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_arm64.deb ...
A descompactar php8.3-zip (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A seleccionar pacote anteriormente não seleccionado php-zip.
A preparar para desempacotar .../07-php-zip_2%3a8.3+94+ubuntu22.04.1+deb.sury.org+2_all.deb ...
A descompactar php-zip (2:8.3+94+ubuntu22.04.1+deb.sury.org+2) ...
A seleccionar pacote anteriormente não seleccionado php8.3.
A preparar para desempacotar .../08-php8.3_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_all.deb ...
A descompactar php8.3 (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A seleccionar pacote anteriormente não seleccionado php8.3-curl.
A preparar para desempacotar .../09-php8.3-curl_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_arm64.deb ...
A descompactar php8.3-curl (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A seleccionar pacote anteriormente não seleccionado php8.3-gd.
A preparar para desempacotar .../10-php8.3-gd_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_arm64.deb ...
A descompactar php8.3-gd (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A seleccionar pacote anteriormente não seleccionado php8.3-intl.
A preparar para desempacotar .../11-php8.3-intl_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_arm64.deb ...
A descompactar php8.3-intl (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A seleccionar pacote anteriormente não seleccionado php8.3-mysql.
A preparar para desempacotar .../12-php8.3-mysql_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_arm64.deb ...
A descompactar php8.3-mysql (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A seleccionar pacote anteriormente não seleccionado php8.3-xml.
A preparar para desempacotar .../13-php8.3-xml_8.3.6-1+ubuntu22.04.1+deb.sury.org+1_arm64.deb ...
A descompactar php8.3-xml (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
Configurando php-common (2:94+ubuntu22.04.1+deb.sury.org+2) ...
Configurando php8.3-common (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.3/mods-available/calendar.ini with new version

Creating config file /etc/php/8.3/mods-available/ctype.ini with new version

Creating config file /etc/php/8.3/mods-available/exif.ini with new version

Creating config file /etc/php/8.3/mods-available/fileinfo.ini with new version

Creating config file /etc/php/8.3/mods-available/ffi.ini with new version

Creating config file /etc/php/8.3/mods-available/ftp.ini with new version

Creating config file /etc/php/8.3/mods-available/gettext.ini with new version

Creating config file /etc/php/8.3/mods-available/iconv.ini with new version

Creating config file /etc/php/8.3/mods-available/pdo.ini with new version

Creating config file /etc/php/8.3/mods-available/phar.ini with new version

Creating config file /etc/php/8.3/mods-available/posix.ini with new version

Creating config file /etc/php/8.3/mods-available/shmop.ini with new version

Creating config file /etc/php/8.3/mods-available/sockets.ini with new version

Creating config file /etc/php/8.3/mods-available/sysvmsg.ini with new version

Creating config file /etc/php/8.3/mods-available/sysvsem.ini with new version

Creating config file /etc/php/8.3/mods-available/sysvshm.ini with new version

Creating config file /etc/php/8.3/mods-available/tokenizer.ini with new version
Configurando php8.3-zip (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.3/mods-available/zip.ini with new version
Configurando php8.3-mysql (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.3/mods-available/mysqlnd.ini with new version

Creating config file /etc/php/8.3/mods-available/mysqli.ini with new version

Creating config file /etc/php/8.3/mods-available/pdo_mysql.ini with new version
Configurando php8.3-readline (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.3/mods-available/readline.ini with new version
Configurando php-zip (2:8.3+94+ubuntu22.04.1+deb.sury.org+2) ...
Configurando php8.3-xml (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.3/mods-available/dom.ini with new version

Creating config file /etc/php/8.3/mods-available/simplexml.ini with new version

Creating config file /etc/php/8.3/mods-available/xml.ini with new version

Creating config file /etc/php/8.3/mods-available/xmlreader.ini with new version

Creating config file /etc/php/8.3/mods-available/xmlwriter.ini with new version

Creating config file /etc/php/8.3/mods-available/xsl.ini with new version
Configurando php8.3-opcache (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.3/mods-available/opcache.ini with new version
Configurando php8.3-gd (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.3/mods-available/gd.ini with new version
Configurando php8.3-curl (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.3/mods-available/curl.ini with new version
Configurando php8.3-intl (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.3/mods-available/intl.ini with new version
Configurando php8.3-cli (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
update-alternatives: a usar /usr/bin/php8.3 para disponibilizar /usr/bin/php (php) em modo auto
update-alternatives: a usar /usr/bin/phar8.3 para disponibilizar /usr/bin/phar (phar) em modo auto
update-alternatives: a usar /usr/bin/phar.phar8.3 para disponibilizar /usr/bin/phar.phar (phar.phar) em modo auto

Creating config file /etc/php/8.3/cli/php.ini with new version
Configurando libapache2-mod-php8.3 (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.3/apache2/php.ini with new version
apache2_invoke: Enable module php8.3
Configurando php8.3 (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A processar 'triggers' para man-db (2.10.2-1) ...
A processar 'triggers' para php8.3-cli (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
A processar 'triggers' para libapache2-mod-php8.3 (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...

PHP Modules:

ubuntu@ubuntu-server-arm-guibla:~$ sudo php8.3 -m
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
DanielnetoDotCom commented 7 months ago

for some reason, you are not detecting the ZipArchive where exactly are you seeing this message?

also try

sudo apt install php-zip

and also check your command line PHP version

php -v
gbrn commented 7 months ago

The message appears right after entering the installation data... database... streamer login... Access this URL: https://encoder01.cnetv.com.br/

image

I think this message was created by you, for an installation check, correct? What are the parameters that the script checks? How do I run individually?

I sent the installed modules above... ZipArchive, isn't that it? :

image

also try

sudo apt install php-zip

image

and also check your command line PHP version

php -v

image

DanielnetoDotCom commented 7 months ago

Please execute this in the terminal

php -m | /bin/grep -i Zip
DanielnetoDotCom commented 7 months ago

Also, I just sent you an update that will give us more clues of what is happening.

gbrn commented 7 months ago

Danny, look, I got different results when I typed the command sudo php -m and sudo php8.3 -m: You've seen this happen:

ubuntu@ubuntu-server-arm-guibla:~$ sudo php -m
[PHP Modules]
Core
ctype
date
dom
fileinfo
filter
hash
iconv
json
libxml
mysqli
mysqlnd
pcre
PDO
pdo_sqlite
Phar
posix
random
Reflection
session
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter

[Zend Modules]
ubuntu@ubuntu-server-arm-guibla:~$ sudo php8.3 -m
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
gbrn commented 7 months ago

Also, I just sent you an update that will give us more clues of what is happening.

I did the PULL. Now the message that appears has changed:

The ZipArchive class is not available in the PHP CLI environment. Please install the PHP Zip extension.

I will try to remove any PHP installation, there is something conflicting with my PHP.

gbrn commented 7 months ago

I removed all versions of PHP completely. And I installed the modules one by one, in each command. That way it worked.

DanielnetoDotCom commented 7 months ago

Danny, look, I got different results when I typed the command sudo php -m and sudo php8.3 -m: You've seen this happen:

that probably means something.

I just sent updates that will not kill your encoder if it cannot find the module, but there is a risk it will not work to transfer HLS files