This is a fascinating error that a few people reported. As you can see, it is occurring in the part of twig (the library Matomo uses to generate the HTML output) where twig tries to write/read the cache of the templates on the disk.
Even more interestingly, if you check the code, you will see that there is no printf call there, but instead just a regular PHP file_put_contents and rename. So my guess is that something in you PHP setup causes these two functions to internally break.
So either there is a (really obscure) bug in the PHP version you (and a few other people) are using or in a PHP module that is executed during these two calls.
Weirdly enough there is very little information on the internet about this issue.