I have the same problem using debian 12. This was what i have in renderd.conf
[mapnik]
plugins_dir=/usr/lib/mapnik/3.0/input
font_dir=/usr/share/fonts/truetype/dejavu
font_dir_recurse=false
I have to change plugins_dir to /usr/lib/mapnik/3.1/input