I have the exact same problem: I tried to update to 2.4 from a working Yunohost 2.2 on Jessie, and during the upgrade I encountered the following messages:
....
Attention : 574081b1 mdb_db_open: database "dc=yunohost,dc=org" cannot be opened: No such file or directory (2). Restore from backup!
Attention : 574081b1 backend_startup_one (type=mdb, suffix="dc=yunohost,dc=org"): bi_db_open failed! (2)
Attention : slap_startup failed
Erreur : Échec de l'exécution du script « /usr/share/yunohost/hooks/conf_regen/06-slapd »
....
I haven’t rebooted my machine yet, so I am still logged in as root. But I am affraid to restart and to not be able to log in anymore .
With the non-rebooted machine, I tried the command again manually with no success:
$ /usr/share/yunohost/hooks/conf_regen/06-slapd init
5740834b mdb_db_open: database "dc=yunohost,dc=org" cannot be opened: No such file or directory (2). Restore from backup!
5740834b backend_startup_one (type=mdb, suffix="dc=yunohost,dc=org"): bi_db_open failed! (2)
slap_startup failed (test would succeed using the -u switch)
Any ideas? Thanks in advance! Really looking forward to use 2.4