any particular reason you're running 231? What version of ubuntu are you running? You could always compile the latest version (247) without much trouble at all.
from packages.ubuntu.com
Package mame
bionic (18.04LTS) (games): Multiple Arcade Machine Emulator (MAME) [universe]
0.195+dfsg.1-2: amd64 arm64 armhf i386 s390x
focal (20.04LTS) (games): Multiple Arcade Machine Emulator (MAME) [universe]
0.220+dfsg.1-1: amd64 arm64 armhf ppc64el s390x
impish (21.10) (games): Multiple Arcade Machine Emulator (MAME) [universe]
0.235+dfsg.1-1ubuntu1: amd64 arm64 armhf ppc64el s390x
jammy (22.04LTS) (games): Multiple Arcade Machine Emulator (MAME) [universe]
0.242+dfsg.1-1: amd64 arm64 armhf ppc64el s390x
kinetic (games): Multiple Arcade Machine Emulator (MAME) [universe]
0.245+dfsg.1-1: amd64 arm64 armhf ppc64el s390x
From version to version, probably 95+% of roms don't change so unless there's a specific game that you want to play, most should work fine.