Audacity error when starting “The application “Audacity.app” can’t be opened.”
Posted by jpluimers on 2020/06/29
For quite a while, I had the error “The application “Audacity.app” can’t be opened.” and Audacity still opening. Clicking the OK button often enough made me hunt for the solution:
This is what I did:
$ cd ~/Library/Application\ Support/audacity
$ grep Temp audacity.cfg
TempDir=/Users/jeroenp/Library/Application Support/audacity/SessionData
Then I checked if the directory existed:
$ find ~/Library/Application\ Support/audacity -type d
/Users/jeroenp/Library/Application Support/audacity
/Users/jeroenp/Library/Application Support/audacity/AutoSave
/Users/jeroenp/Library/Application Support/audacity/Plug-Ins
/Users/jeroenp/Library/Application Support/audacity/SessionData
The odd thing is the directory already existed, so I decided to delete the line, but first needed sed -n
(the -n
is important: it list only non-matching lines to stdout, see [WayBack] regex – What actually the meaning of “-n” in sed? – Stack Overflow):
$ sed -n '/^TempDir=/p' ~/Library/Application\ Support/audacity/audacity.cfg
TempDir=/Users/jeroenp/Library/Application Support/audacity/SessionData
Since this is Mac OS/Mac OS X/OS X, the -i
parameter requires a string even if it is an empty [WayBack] shell – Delete lines in a text file that contain a specific string – Stack Overflow so we get:
$ sed -i '' -n '/^TempDir=/d' ~/Library/Application\ Support/audacity/audacity.cfg
After that, starting audacity still gave the same error and the TempDir
entry was re-added.
So I did this:
- renamed the
audacity
directory toaudacity.bad
, - recreated an empty
audacity
directory - created empty subdirectories
AutoSave
,Plug-Ins
,SessionData
- looped this loop
- Start
Audacity
- On success copy a missing file in the
audacity
directory tree from theaudacity.bad
directory tree
- Start
In the end, these files were the cause:
pluginregistry.cfg
pluginsettings.cfg
Since I wasn’t using any plugins, I removed them. Now audacity starts fine.
Now that I had the files pinpointed, I could refine the search and this seems to be a common problem [WayBack] FAQ:Installation, Startup and Plug-ins – Audacity Development Manual: How can I solve Audacity not appearing or crashing on launch, or crashing after I add a plug-in?.
Too bad that page didn’t show up in the original search results.
–jeroen
Leave a Reply