PHP-Modul zip nicht installiert

Hallo,

erhalte im Browser beim Starten von nc die Meldung ‘PHP-Modul zip nicht installiert.’.

Nun zugegeben habe schon lange keine Systemwartung / Update gemacht, kann gar nicht genau sagen welche Version von nc gerade installiert ist, glaube irgendwas mit 24
 Aber was ich kann nutze eine Ubuntu in der 22.10 als Server Version.

Klar ist nicht viel Input, wÀre schön wenn ich dennoch Abhilfe erhalte, Danke.

Gruss gil

Wie hast du denn Nextcloud installiert?

irgendwann einmal, schon lange her, ich Glaube mit nc Version 8 oder so

Mit so wenig Informationen ist es schwierig detailierte Hilfe anbieten. Falls du eine manuelle Installation auf Ubuntu fÀhrst, kann PHP-ZIP ganz normal via dem APT Paketmanager installiert werden.

sudo apt install php-zip

oder eine spezifische Version (wenn du auf Ubuntu 22.10 bist, wÀre das die Version 8.1)

sudo apt install php8.1-zip

versuche gerade

sudo apt install php8.1-zip
Paketlisten werden gelesen
 Fertig
AbhÀngigkeitsbaum wird aufgebaut
 Fertig
Statusinformationen werden eingelesen
 Fertig
Paket php8.1-zip ist nicht verfĂŒgbar, wird aber von einem anderen Paket
referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst
wurde oder nur aus einer anderen Quelle verfĂŒgbar ist.

und

sudo apt install php-zip
Paketlisten werden gelesen
 Fertig
AbhÀngigkeitsbaum wird aufgebaut
 Fertig
Statusinformationen werden eingelesen
 Fertig
Hinweis: »php8.0-zip« wird an Stelle von »php-zip« gewÀhlt.
php8.0-zip ist schon die neueste Version (8.0.17-1+ubuntu18.04.1+deb.sury.org+1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 6 nicht aktualisiert.

Kannst du mal den Output von update-alternatives --query php und php -m posten?

gerne anbei

update-alternatives --query php 
Name: php
Link: /usr/bin/php
Slaves:
 php.1.gz /usr/share/man/man1/php.1.gz
Status: auto
Best: /usr/bin/php8.1
Value: /usr/bin/php8.1

Alternative: /usr/bin/php7.4
Priority: 74
Slaves:
 php.1.gz /usr/share/man/man1/php7.4.1.gz

Alternative: /usr/bin/php8.0
Priority: 80
Slaves:
 php.1.gz /usr/share/man/man1/php8.0.1.gz

Alternative: /usr/bin/php8.1
Priority: 81
Slaves:
 php.1.gz /usr/share/man/man1/php8.1.1.gz

und

php -m
[PHP Modules]
apcu
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
json
libxml
mbstring
memcache
memcached
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pgsql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zlib

[Zend Modules]
Zend OPcache

Ok. Die aktive Version scheint 8.1 zu sein. Ich bin aber nicht sicher, warum sich php8.1-zip nicht installieren lĂ€sst. Was meint denn Nextcloud selbst, was fĂŒr eine Version verwendet wird? Das solltest du in den Admin Einstellungen der Nextcloud unter dem Punkt “System” finden


ok leider komme ich in die gui nicht rein

Hast du vor dem Installationsversuch das System mal aktualisiert?

sudo apt update && sudo apt full-upgrade

Wenn danach die Installation von php8.1-zip immer noch nicht klappt, poste mal noch die Ausgabe der folgenden Befehle:

apt list php* --installed

und

apt policy php8*-zip

Hi bin wieder online, anbei

~ $ apt list php* --installed
Auflistung
 Fertig

~ $ apt policy php8*-zip
php8.0-zip:
  Installiert:           8.0.17-1+ubuntu18.04.1+deb.sury.org+1
  Installationskandidat: 8.0.17-1+ubuntu18.04.1+deb.sury.org+1
  Versionstabelle:
 *** 8.0.17-1+ubuntu18.04.1+deb.sury.org+1 100
        100 /var/lib/dpkg/status
php8.1-zip:
  Installiert:           (keine)
  Installationskandidat: (keine)
  Versionstabelle:
     8.1.2-1ubuntu2.9 -1
        100 /var/lib/dpkg/status

GemĂ€ss update-alternatives --query php in diesem Post sieht so aus als wĂŒrde dein System PHP 8.1 verwenden. PHP-ZIP ist aber in der Version 8.0 installiert. Komisch ist auch, dass bei dir nur die php8.0-zip als Installationskandiat angezeigt wird, php8.1-zip keinen Installationskandidaten hat und php8.2-zip ĂŒberhaupt nicht angezeigt wird.

Ist das “Sury Repo” noch vorhanden in deiner /etc/apt/sources.list oder unter /etc/apt/sources.list.d? Hast du ein apt update gemacht, bevor du versucht hast php8.1-zip zu installieren? Evtl. wurden das Repo auch deaktiviert, bei einem Release Upgrade von Ubuntu


klar ein sudo apt update habe ich gemacht. In 'sources.list.d habe ich keine EintrÀge, anbei mal meine 'source.list

deb http://de.archive.ubuntu.com/ubuntu kinetic main
deb http://de.archive.ubuntu.com/ubuntu kinetic-updates main
deb http://de.archive.ubuntu.com/ubuntu kinetic-backports main
deb http://de.archive.ubuntu.com/ubuntu kinetic-security main

Kleine Randnotiz: Kinetic ist kein Long Term Support Release, sprich alle halbe Jahre musst du ein Release Upgrade machen
 Anyways
 :wink:

Kannst du mal noch die Ausgabe des folgenden Befehls posten, nur um sicher zu gehen welche Pakete installiert sind und von wo


apt list php* --installed

Ok danke fĂŒr den Hinweis, wie kann ich auf stable umstellen ohne alle halbe Jahre ein Relase Upgrade anzustoßen? Wenn ich ‘apt list php* --installed’ los lasse erhalte ich nur ‘Auflistung Fertig’

Nur via Neuinstallation. Das aktuelle LTS Release ist 22.04 (du bist auf 22.10) und das nÀchste wird 24.04 sein. Downgrades gehen nicht.

Hmm komisch, bei mir listet er alle installierten php* Pakete auf. Mit apt list php* | grep installed kommt auch nichts?

EDIT:

Oder versuch mal:

apt list php* | grep installiert

Falls keiner der oben genannten Befehle etwas anzeigt
 Dieser mĂŒsste auf jeden Fall etwas anzeigen:

dpkg -l | grep php
$ apt list php* | grep installiert

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

ja hier wir jede Menge angezeigt


$ dpkg -l | grep php
ii  libapache2-mod-php                     2:8.1+92ubuntu1                               all          server-side, HTML-embedded scripting language (Apache 2 module) (default)
rc  libapache2-mod-php7.4                  8.1.2-1ubuntu2.9                              amd64        Transitional package
rc  libapache2-mod-php8.0                  8.1.2-1ubuntu2.9                              amd64        Transitional package
ii  libapache2-mod-php8.1                  8.1.7-1ubuntu3.2                              amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  libphp-adodb                           5.21.4-1                                      all          ADOdb is a PHP database abstraction layer library
ii  php                                    2:8.1+92ubuntu1                               all          server-side, HTML-embedded scripting language (default)
ii  php-common                             2:92+ubuntu18.04.1+deb.sury.org+2             all          Common files for PHP packages
ii  php-curl                               2:8.1+92ubuntu1                               all          CURL module for PHP [default]
ii  php-gd                                 2:8.1+92ubuntu1                               all          GD module for PHP [default]
ii  php-imagick                            3.7.0-2                                       amd64        Provides a wrapper to the ImageMagick library
ii  php-mysql                              2:8.1+92ubuntu1                               all          MySQL module for PHP [default]
ii  php-pgsql                              2:8.1+92ubuntu1                               all          PostgreSQL module for PHP [default]
ii  php-xml                                2:8.1+92ubuntu1                               all          DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
ii  php7.4-apcu                            5.1.21+4.0.11-7+ubuntu18.04.1+deb.sury.org+10 amd64        APC User Cache for PHP
ii  php7.4-apcu-bc                         1.0.5-14+ubuntu18.04.1+deb.sury.org+3         amd64      
  APCu Backwards Compatibility Module
rc  php7.4-bcmath                          7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        Bcmath module for PHP
ii  php7.4-cli                             7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        command-line interpreter for the PHP scripting language
ii  php7.4-common                          7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        documentation, examples and common module for PHP
rc  php7.4-curl                            7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        CURL module for PHP
rc  php7.4-gd                              7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        GD module for PHP
rc  php7.4-gmp                             7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        GMP module for PHP
ii  php7.4-igbinary                        3.2.6+2.0.8-6+ubuntu18.04.1+deb.sury.org+10   amd64        igbinary PHP serializer
rc  php7.4-imagick                         3.6.0-4+ubuntu18.04.1+deb.sury.org+10         amd64        Provides a wrapper to the ImageMagick library
rc  php7.4-intl                            7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        Internationalisation module for PHP
ii  php7.4-json                            7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        JSON module for PHP
rc  php7.4-mbstring                        7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        MBSTRING module for PHP
rc  php7.4-mysql                           7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        MySQL module for PHP
ii  php7.4-opcache                         7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        Zend OpCache module for PHP
ii  php7.4-readline                        7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        readline module for PHP
ii  php7.4-redis                           5.3.6+4.3.0-1+ubuntu18.04.1+deb.sury.org+1    amd64        PHP extension for interfacing with Redis
rc  php7.4-xml                             7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        DOM, SimpleXML, XML, and XSL module for PHP
rc  php7.4-zip                             7.4.28-1+ubuntu18.04.1+deb.sury.org+1         amd64        Zip module for PHP
ii  php8.0-apcu                            5.1.21+4.0.11-7+ubuntu18.04.1+deb.sury.org+10 amd64        APC User Cache for PHP
ii  php8.0-bcmath                          8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        Bcmath module for PHP
ii  php8.0-cli                             8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        command-line interpreter for the PHP scripting language
ii  php8.0-common                          8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        documentation, examples and common module for PHP
ii  php8.0-curl                            8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        CURL module for PHP
ii  php8.0-gd                              8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        GD module for PHP
ii  php8.0-gmp                             8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        GMP module for PHP
ii  php8.0-igbinary                        3.2.6+2.0.8-6+ubuntu18.04.1+deb.sury.org+10   amd64        igbinary PHP serializer
rc  php8.0-imagick                         3.6.0-4+ubuntu18.04.1+deb.sury.org+10         amd64        Provides a wrapper to the ImageMagick library
ii  php8.0-intl                            8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        Internationalisation module for PHP
ii  php8.0-mbstring                        8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        MBSTRING module for PHP
ii  php8.0-mysql                           8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        MySQL module for PHP
ii  php8.0-opcache                         8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        Zend OpCache module for PHP
ii  php8.0-readline                        8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        readline module for PHP
ii  php8.0-redis                           5.3.6+4.3.0-1+ubuntu18.04.1+deb.sury.org+1    amd64        PHP extension for interfacing with Redis
ii  php8.0-xml                             8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        DOM, SimpleXML, XML, and XSL module for PHP
ii  php8.0-zip                             8.0.17-1+ubuntu18.04.1+deb.sury.org+1         amd64        Zip module for PHP
ii  php8.1                                 8.1.7-1ubuntu3.2                              all          server-side, HTML-embedded scripting language (metapackage)
ii  php8.1-apcu                            5.1.21+4.0.11-7ubuntu1                        amd64        APC User Cache for PHP
rc  php8.1-bcmath                          8.1.2-1ubuntu2.9                              amd64        Bcmath module for PHP
ii  php8.1-cli                             8.1.7-1ubuntu3.2                              amd64        command-line interpreter for the PHP scripting language
ii  php8.1-common                          8.1.7-1ubuntu3.2                              amd64        documentation, examples and common module for PHP
ii  php8.1-curl                            8.1.7-1ubuntu3.2                              amd64        CURL module for PHP
ii  php8.1-gd                              8.1.7-1ubuntu3.2                              amd64        GD module for PHP
ii  php8.1-igbinary                        3.2.6+2.0.8-7ubuntu1                          amd64        igbinary PHP serializer
ii  php8.1-imagick                         3.7.0-2                                       amd64        Provides a wrapper to the ImageMagick library
rc  php8.1-imap                            8.1.2-1ubuntu2.9                              amd64        IMAP module for PHP
rc  php8.1-intl                            8.1.2-1ubuntu2.9                              amd64        Internationalisation module for PHP
ii  php8.1-mbstring                        8.1.7-1ubuntu3.2                              amd64        MBSTRING module for PHP
ii  php8.1-memcache                        8.0+4.0.5.2+3.0.9~20170802.e702b5f9+-7        amd64        memcache extension module for PHP
ii  php8.1-memcached                       3.1.5+2.2.0-14.1                              amd64        memcached extension module for PHP, uses libmemcached
ii  php8.1-msgpack                         2.2.0~rc1+2.1.2+0.5.7-6                       amd64        PHP extension for interfacing with MessagePack
ii  php8.1-mysql                           8.1.7-1ubuntu3.2                              amd64        MySQL module for PHP
ii  php8.1-opcache                         8.1.7-1ubuntu3.2                              amd64        Zend OpCache module for PHP
ii  php8.1-pgsql                           8.1.7-1ubuntu3.2                              amd64        PostgreSQL module for PHP
rc  php8.1-phpdbg                          8.1.2-1ubuntu2.9                              amd64        server-side, HTML-embedded scripting language (PHPDBG binary)
ii  php8.1-readline                        8.1.7-1ubuntu3.2                              amd64        readline module for PHP
ii  php8.1-redis                           5.3.5+4.3.0-5.1                               amd64        PHP extension for interfacing with Redis
ii  php8.1-xml                             8.1.7-1ubuntu3.2                              amd64        DOM, SimpleXML, XML, and XSL module for PHP
ii  php8.1-xmlrpc                          3:1.0.0~rc3-2.1                               amd64        XML-RPC servers and clients functions for PHP
rc  php8.1-zip                             8.1.2-1ubuntu2.9                              amd64        Zip module for PHP
ii  phppgadmin                             7.13.0+dfsg-2                                 all          web-based administration tool for PostgreSQL

Hmm da sind alle möglichen PHP Versionen isntalliert. 8.1 kommt aus den Ubuntu Repos und die Àlteren aus den Sury Repos, die offenbar in deinen APT Source Listen nicht mehr vorhanden sind. Komisch ist, dass php-zip in allen Versionen installiert zu sein scheint.
aktiv ist


php -v

und dann die anderen deaktivieren:

a2dismod php7.4

und diejenige die du verwenden willst aktivieren:

a2enmod php8.1

Und im schlimmsten Fall alle Versionen deinstallieren


sudo apt remove php*


und dann alle benötigten Pakete (am besten in der Version 8.1, aus den Ubuntu Repos) wieder installieren)

Ansonsten wĂŒsste ich jetzt spontan auch nicht mehr weiter