Problem upgrading from 7.13 to 8.2

While trying to upgrade from 7.13. to 8.2 i ran this command:

sudo -u www-data /var/www/suitecrm8/bin/console suitecrm:app:setup-legacy-migration

I received this error:

In XmlUtils.php line 50:

Extension DOM is required.

I use PHP 7.4 and the php-xml module is installed. The php-dom module cannot be installed because php-xml is already there:

sudo apt install php7.4-dom
Reading package listsā€¦ Done
Building dependency treeā€¦ Done
Reading state informationā€¦ Done
Note, selecting ā€˜php7.4-xmlā€™ instead of ā€˜php7.4-domā€™
php7.4-xml is already the newest version (1:7.4.33-5+ubuntu22.04.1+deb.sury.org+1).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

What can i do?

Regards, Peter

Ok, i changed the default php version to 7.4 and now i can proceed. But after running this command another error occurs:

sudo -u www-data /var/www/suitecrm8/bin/console suitecrm:app:upgrade-finalize -t suitecrm-8-2-2-7-12-migration

11:41:05 CRITICAL [console] Error thrown while running command ā€œsuitecrm:app:upgrade-finalize -t suitecrm-8-2-2-7-12-migrationā€. Message: ā€œCall to undefined method Symfony\Component\Console\Input\InputDefinition::hasNegation()ā€ [ā€œexceptionā€ => Error { ā€¦},ā€œcommandā€ => ā€œsuitecrm:app:upgrade-finalize -t suitecrm-8-2-2-7-12-migrationā€,ā€œmessageā€ => ā€œCall to undefined method Symfony\Component\Console\Input\InputDefinition::hasNegation()ā€]

In ArrayInput.php line 169:

Attempted to call an undefined method named ā€œhasNegationā€ of class ā€œSymfony\Component\Console\Input\InputDefinitionā€.

When i browse to the SuiteCRM 8 instance i cannot login:

Any ideas?

Regards, Peter