avidemux can do this. It is inside Ubuntu Software Center or you can install it from the command line with: sudo apt-get install avidemux.
If the audio is absent or garbled on the converted file try:
The OP was about extracting the audio track from an MKV container.
If what you want is to really extract the audio, you can simply "copy" the audio track to a file using ...
To encode a high quality MP3 or MP4 audio from a movie file (eg AVI, MP4, MOV, etc), I find it's best to use -q:a 0 ...
to MP4); Remove audio tracks from a file; Extract music track from a video and ...
video1.mp4 is saved and audio_replace.m4a (or mp3 whatever it is) is saved.
On "Audio codec" tab, similarly select both "Audio" and "Keep original audio track".
files. Extract audio tracks from video using for example mkvextractgui, ...
From the VLC menu go to Media > Convert / Save [CTRL + R ].