ocramius/package-versions only provides support for Composer 2 in 1.8+, which requires PHP 7.4. If you can not upgrade PHP you can require composer/package-versions-deprecated to resolve this with PHP 7.0+. code example
Example: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0".
composer install --ignore-platform-reqs