install in mac
maraidb
bench get-app erpnext
bench --site library.test install-app erpnext
Try restarting your mariadb. This should automatically repair the tables