Error: Failed to load shared library 'libavformat.so.59' (error 0: Success)

I use Ubuntu 22.10 (beta) and Audacity 3.2.0 from Ubuntu Software (snapcraft.io latest/edge). The build info is:

Program build date: Oct 4 2022
Commit id: 135773 of Thu Sep 22 19:16:06 2022 +0300
Build type: CMake Release build (debug level 1), 64 bits


Yesterday there was suddenly only very weak sound from Audacity, no matter what audio device I used. When I start Audacity, this is written to the log:

12:47:25: Audacity 3.2.0
12:47:25: sqlite3 message: (1) no such table: project in "SELECT 1 FROM project LIMIT 1;"
12:47:25: Error: Failed to load shared library 'libavformat.so.59' (error 0: Success)
12:47:25: Error: Failed to load libavformat.so.59 (libavformat.so.59: cannot open shared object file: No such file or directory)

If I try to manually add the path to libavformat.so.59, I get this:

12:47:44: Attempting to load LAME from system search paths
12:47:44: Loading LAME from libmp3lame.so.0
12:47:44: Actual LAME path /snap/audacity/1061/usr/lib/x86_64-linux-gnu/libmp3lame.so.0.0.0
12:47:44: LAME library successfully loaded
12:47:44: Error: Failed to load shared library 'libavformat.so.59' (error 0: Success)
12:47:44: Error: Failed to load libavformat.so.59 (libavformat.so.59: cannot open shared object file: No such file or directory)
12:47:47: Error: Failed to load shared library 'libavformat.so.59' (error 0: Success)
12:47:47: Error: Failed to load libavformat.so.59 (libavformat.so.59: cannot open shared object file: No such file or directory)
12:47:49: Looking for FFmpeg libraries...
12:48:04: User-specified path = '/usr/lib/x86_64-linux-gnu/'
12:48:04: Error: Failed to load shared library 'libavformat.so.59' (error 0: Success)
12:48:04: Error: Failed to load libavformat.so.59 (libavformat.so.59: cannot open shared object file: No such file or directory)
12:48:04: User-specified FFmpeg file exists. Success.
12:48:04: Error: Failed to load shared library 'libavformat.so.59' (error 0: Success)
12:48:04: Error: Failed to load libavformat.so.59 (libavformat.so.59: cannot open shared object file: No such file or directory)
12:48:04: Error: Failed to load shared library 'libavformat.so.59' (error 0: Success)
12:48:04: Error: Failed to load libavformat.so.59 (libavformat.so.59: cannot open shared object file: No such file or directory)

Note the line with “12:48:04: User-specified FFmpeg file exists. Success.” …

Maybe someone can post a proper bug report?

Bug reports for the Snap package need to go to the Snap developer (probably here: GitHub - diddlesnaps/audacity: Snap of Audacity: Audio software for multi-track recording and editing).

If the problem also occurs in the AppImage (from here: Audacity ® | Downloads) then we can log it for the Audacity developers.