Installing MAME on Linux
Actually, all Linuxes are alike. Almost. In the end, you run into problems because one system is by default installed with some library that another does not use. Since these libraries are installed only once, the challenge is to find out which libraries need to be installed and which are already there, and this is again different from system to system.
Thus, not the Linuxes are different, but their installation evolves over time. I will give some hints for installing MAME on different systems on this page.
Running MAME
openSUSE Tumbleweed
If you are using the rolling release of openSUSE (which is named Tumbleweed), the only missing library is libSDL2_ttf-2_0-0.
sudo zypper install libSDL2_ttf-2_0-0
After that, you should be able to run MAME. (Please report if you find a different situation.)
Ubuntu 18
Building MAME
You certainly need more packages when you intend to build MAME from sources. This is much less difficult than it sounds; MAME has an excellent code quality, and once you have installed the required tools and libraries, the compiling process will run without any errors or warnings.
The advantage of building MAME is that you always get the latest fixes and new features, and you don't have to wait until the last Wednesday of a month (official release date).
openSUSE Tumbleweed
sudo zypper install git sudo zypper install gcc-c++ sudo zypper install libSDL2-devel sudo zypper install libSDL2_ttf-devel sudo zypper install alsa-devel sudo zypper install fontconfig-devel sudo zypper install libQt5Widgets-devel sudo zypper install libXinerama-devel
You can put all library names in a single install line (separated by spaces), so you don't have to enter all lines separately.