Issues compiling game Linux/Ubuntu 20.04


I get the following message after trying to compile and run the project. Right now its just the default Game class which im trying to run.

Monogame version: 3.7.1

*Exception has occurred: CLR/Microsoft.Xna.Framework.Audio.NoAudioHardwareException
An unhandled exception of type ‘Microsoft.Xna.Framework.Audio.NoAudioHardwareException’ occurred in MonoGame.Framework.dll: ‘OpenAL device could not be initialized, see console output for details.’

  • at Microsoft.Xna.Framework.Audio.OpenALSoundController…ctor()*
  • at Microsoft.Xna.Framework.Audio.OpenALSoundController.get_GetInstance()*
  • at Microsoft.Xna.Framework.SdlGamePlatform…ctor(Game game)*
  • at Microsoft.Xna.Framework.GamePlatform.PlatformCreate(Game game)*
  • at Microsoft.Xna.Framework.Game…ctor()*
  • at Debug1.Game1…ctor() in /home/voksar/Desktop/app/CSharp/Debug1/Debug1/Game1.cs:line 13*
  • at Debug1.Program.Main() in /home/voksar/Desktop/app/CSharp/Debug1/Debug1/Program.cs:line 10*

Output from terminal:

ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device ‘default’: No such file or directory

I tried looking around for this issue but cant manage to find a solution.
Appreciate all help!

Using MonoGame 3.8 is no option? I guess it would work out of the box and you wouldn’t have to try and solve issues for this older version of MonoGame.

Im somewhat new to the Ubuntu/Linux OS which means i have no clue how to install MonoGame 3.8 yet. Also my current game that i wanna program on in Ubuntu is based on 3.7.1

The official documentation is very good and simple to follow. Getting the older versions of MonoGame running on Linux was way more complicated. Also with the newest version shader compilation is possible too :slight_smile: