Could not connect to database, check logs/librenms.log. | Whoops, looks like something went wrong. Check your librenms.log

Yes you’ll need to upgrade your PHP version, maybe check whats installed first as you seem to have 7.4 php-cli , so you will want to delete old packages first Php version upgrade

So probably just apache/nginx packages that needs correcting Http 500 after upgrade