Update to 8.6.1 aborts with Critical Error Attempted to load "ZipArchive"

Im assuming a php misconfiguration, but have been unable to fix. Error below

Note. This was run on a copy of SuiteCRM.

Install log as follows.
ā€œā€"
suitecrm:app:upgrade [-t|ā€“target-version TARGET-VERSION]

root@VM-Mint:/var/www/html/suitecrm#
root@VM-Mint:/var/www/html/suitecrm#
root@VM-Mint:/var/www/html/suitecrm#
root@VM-Mint:/var/www/html/suitecrm#
root@VM-Mint:/var/www/html/suitecrm#
root@VM-Mint:/var/www/html/suitecrm#
root@VM-Mint:/var/www/html/suitecrm#
root@VM-Mint:/var/www/html/suitecrm#
root@VM-Mint:/var/www/html/suitecrm#
root@VM-Mint:/var/www/html/suitecrm# ./bin/console suitecrm:app:upgrade -t SuiteCRM-8.6.1
PHP Deprecated: Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/suitecrm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 134
PHP Deprecated: Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/suitecrm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 144
PHP Deprecated: Return type of Symfony\Component\HttpFoundation\Session\Session::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/suitecrm/vendor/symfony/http-foundation/Session/Session.php on line 131
PHP Deprecated: Return type of Symfony\Component\HttpFoundation\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/suitecrm/vendor/symfony/http-foundation/Session/Session.php on line 141

SuiteCRM Upgrade

Running: backup-original-modules
step: backup-original-modules | status: done
Successfully backed up files
Running: check-package
step: check-package | status: done
Package found in path
Running: extract-package
17:31:49 CRITICAL [console] Error thrown while running command ā€œsuitecrm:app:upgrade -t ā€˜SuiteCRM-8.6.1ā€™ā€. Message: ā€œClass ā€œZipArchiveā€ not foundā€ [ā€œexceptionā€ => Error { ā€¦},ā€œcommandā€ => ā€œsuitecrm:app:upgrade -t ā€˜SuiteCRM-8.6.1ā€™ā€,ā€œmessageā€ => ā€œClass ā€œZipArchiveā€ not foundā€]

In PackageHandler.php line 67:

Attempted to load class ā€œZipArchiveā€ from the global namespace.
Did you forget a ā€œuseā€ statement?

suitecrm:app:upgrade [-t|ā€“target-version TARGET-VERSION]

root@VM-Mint:/var/www/html/suitecrm#
ā€œā€"

Pointers would be much appreciatedā€¦

My file was different, check your spelling and capitalization.

suitecrm-8-6-1

The php zip module is not installed or enabled.
Do you see it in the list when you run this?
php -m

To install and enable it on Mint (debian), try these commands:

sudo apt install php-zip
sudo apt install php8.2-zip
sudo apt install php-pecl-zip
sudo pecl install zip
sudo phpenmod zip
1 Like

Hello Larry,

once the environment is ready, the upgrade works ok.
But I had some issues with the lower / upper case of the docs.

Check out my video, to see if it helps:

Thank you for the suggestions, Sorry for delay. Iā€™m having major computer issues, it may take a while to show it who is the boss.

1 Like

In attempting to fix hardware and subsequent issues I managed to trash the entire system, backups and all. That will teach me to work when tired. Luckily it wasnt a production system., and I should be able to duplicateā€¦

Hi Larry,

From the provided upgrade logs it looks like the ZipArchive extenion is not enabled on your environment. The ZipArchive class is part of the ZIP extension in PHP. You need to ensure that this extension is installed and enabled.
Following are the installation commands for zip extension:
sudo apt-get install php-zip # For Debian/Ubuntu
sudo yum install php-pecl-zip # For CentOS/RHEL
After installing this restart the apache and try upgrading the SuiteCRM.