• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Can't install missing PHP Extensions required to install PhpSpreadsheet

Lrnt

Basic Pleskian
Server operating system version
Debian 9.13
Plesk version and microupdate number
18.0.44
Hi Experts!

I need to install a composer package named "PhpSpreadsheet".

Running this command :
Code:
composer require phpoffice/phpspreadsheet

Gives the following result :
Code:
Package phpoffice/phpspreadsheet has requirements incompatible with your PHP version, PHP extensions and Composer version:
    - phpoffice/phpspreadsheet 1.25.2 requires ext-dom * but it is not present.
    - phpoffice/phpspreadsheet 1.25.2 requires ext-simplexml * but it is not present.
    - phpoffice/phpspreadsheet 1.25.2 requires ext-xml * but it is not present.
    - phpoffice/phpspreadsheet 1.25.2 requires ext-xmlreader * but it is not present.
    - phpoffice/phpspreadsheet 1.25.2 requires ext-xmlwriter * but it is not present.

So next to this, I try apt-get with :
Code:
apt-get install php7.4-xml

And it does not work with some 404 errors :
Code:
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
The following additional packages will be installed:
  libapache2-mod-php7.4 php7.4-cgi php7.4-cli php7.4-common php7.4-curl php7.4-fpm php7.4-gd php7.4-imap php7.4-json php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-readline php7.4-sqlite3
  php7.4-zip
Paquets suggérés :
  php-pear
Les NOUVEAUX paquets suivants seront installés :
  php7.4-xml
Les paquets suivants seront mis à jour :
  libapache2-mod-php7.4 php7.4-cgi php7.4-cli php7.4-common php7.4-curl php7.4-fpm php7.4-gd php7.4-imap php7.4-json php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-readline php7.4-sqlite3
  php7.4-zip
15 mis à jour, 1 nouvellement installés, 0 à enlever et 170 non mis à jour.
Il est nécessaire de prendre 7 079 ko dans les archives.
Après cette opération, 449 ko d'espace disque supplémentaires seront utilisés.
N: « plesk.list.ai_back » dans le répertoire « /etc/apt/sources.list.d/ » a été ignoré car il utilise une extension non valable
Souhaitez-vous continuer ? [O/n] O
Err:1 https://packages.sury.org/php stretch/main amd64 php7.4-json amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:2 https://packages.sury.org/php stretch/main amd64 php7.4-opcache amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:3 https://packages.sury.org/php stretch/main amd64 php7.4-cgi amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:4 https://packages.sury.org/php stretch/main amd64 php7.4-readline amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:5 https://packages.sury.org/php stretch/main amd64 php7.4-sqlite3 amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:6 https://packages.sury.org/php stretch/main amd64 php7.4-fpm amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:7 https://packages.sury.org/php stretch/main amd64 php7.4-curl amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:8 https://packages.sury.org/php stretch/main amd64 php7.4-mbstring amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:9 https://packages.sury.org/php stretch/main amd64 php7.4-imap amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:10 https://packages.sury.org/php stretch/main amd64 php7.4-mysql amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:11 https://packages.sury.org/php stretch/main amd64 php7.4-gd amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:12 https://packages.sury.org/php stretch/main amd64 php7.4-zip amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:13 https://packages.sury.org/php stretch/main amd64 php7.4-cli amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:14 https://packages.sury.org/php stretch/main amd64 libapache2-mod-php7.4 amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:15 https://packages.sury.org/php stretch/main amd64 php7.4-common amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
Err:16 https://packages.sury.org/php stretch/main amd64 php7.4-xml amd64 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e
  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-json_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-opcache_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-cgi_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-readline_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-sqlite3_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-fpm_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-curl_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-mbstring_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-imap_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-mysql_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-gd_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-zip_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-cli_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/libapache2-mod-php7.4_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-common_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer https://packages.sury.org/php/pool/main/p/php7.4/php7.4-xml_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb  404  Not Found
E: Impossible de récupérer certaines archives, peut-être devrez-vous lancer apt-get update ou essayer avec --fix-missing ?

I tried "apt-get update" and also tried to update the sources.list file.
No success after...

I don't know what to do.
Thank you for your help.

(Debian 9.13, Plesk Obsidian Version 18.0.44)
 
For example, the following gives 404:
Code:
https://packages.sury.org/php/pool/main/p/php7.4/php7.4-xml_7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e_amd64.deb

If I look at the URL, the file is not present but others are like:
Code:
php7.4-xml_7.4.30-6+0~20220918.70+debian10~1.gb..> 19-Sep-2022 08:36               91208
php7.4-xml_7.4.30-6+0~20220918.70+debian11~1.gb..> 19-Sep-2022 02:21               90020
php7.4-xml_7.4.30-6+0~20220918.70+debian11~1.gb..> 19-Sep-2022 02:50              102776
php7.4-xml_7.4.32-1+0~20220929.71+debian10~1.gb..> 29-Sep-2022 23:24               98336
php7.4-xml_7.4.32-1+0~20220929.71+debian10~1.gb..> 30-Sep-2022 08:08               79628
php7.4-xml_7.4.32-1+0~20220929.71+debian10~1.gb..> 30-Sep-2022 03:13              103468
php7.4-xml_7.4.32-1+0~20220929.71+debian11~1.gb..> 29-Sep-2022 22:57               98108
php7.4-xml_7.4.32-1+0~20220929.71+debian11~1.gb..> 30-Sep-2022 02:38               80044
 
It looks like sury doesn't host packages for stretch (Debian 9) anymore (Debian 9 LTS support has ended June 30 2022)
More information
Thank for the reply.
That's what I thought...

Do you know if it is possible to update the repo to make this working?
 
If you check the linked post there are some workarounds that might work but if possible at all you should look into upgrading to Debian 10.
 
@Lrnt , try to use
Code:
deb http://autoinstall-archives.plesk.com/PHP74_17/  stretch all
That won't help because it is for plesk's PHP, not for the distro's.

OP's problem is that, while /usr/local/bin/composer is Plesk's, it still relies on the alternatives mechanism's selection of phar, which per default is the distro's phar.
To add plesk's php7.4 to alternatives and select it:
update-alternatives --install /usr/bin/phar phar /opt/plesk/php/7.4/bin/phar 74 update-alternatives --config phar update-alternatives --install /usr/bin/php php /opt/plesk/php/7.4/bin/php 74 update-alternatives --config php
 
That won't help because it is for plesk's PHP, not for the distro's.

OP's problem is that, while /usr/local/bin/composer is Plesk's, it still relies on the alternatives mechanism's selection of phar, which per default is the distro's phar.
To add plesk's php7.4 to alternatives and select it:
update-alternatives --install /usr/bin/phar phar /opt/plesk/php/7.4/bin/phar 74 update-alternatives --config phar update-alternatives --install /usr/bin/php php /opt/plesk/php/7.4/bin/php 74 update-alternatives --config php
Thank you so much. I'll try this and keep you in touch.
 
Back
Top