I am trying to get pimcore v.5 work and whenever there's some issue with installation, database or extensions, I just get something like this:
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 147456 bytes) in /var/www/vhosts/lings.ch/staging.lings.ch/vendor/composer/ClassLoader.php on line 444
Is there a way to get better debug message? With this it's impossible to understand whether to search for solution.
That is more or less the error message you need. The memory limit is set too low. You should increase the memory_limit setting in your php.ini.
The Pimcore documentation states that 128M should be enough. I would still try with 512M, at least for the setup.