The Music Library File Cannot Be Saved. A Duplicate File Name was Specified, Fix
Several Mac users have said that they receive the following popup error message when they want to use the Music app on the Mac. The message says: “The Music Library file cannot be saved. A duplicate file name was specified”.
It appears that users are running into this error regarding duplicate files when attempting to sync or purchase some new music. If you are having this problem, this article explains how you can fix it.
See also: macOS: iTunes Crashing? Fix
Clear the Music Library and then Check for Available Downloads
First try clearing your library and then download again. Here is how:
1. Quit Music (Music > Quit Music).
2. In Finder, click Go and Home. (see how you can open Library Folder)
3. This will open your Home folder. Then open the Music folder. Then again open the Music folder. Click Media.
4. There will be a few folders inside the Media folder. Then drag all of the folders to the Trash.
5. Open Music.
6. Go to Account > Check for Available Downloads. And download available files.
Now again test to see if you have fixed this problem.
File permission
If you are still having this issue, try this fix. Sometimes permission problems can cause this. Please ensure that your Mac account has full read and write permissions to the Music folder (and its subfolders). Here is how:
1. Quit Music. Open the Home folder again (Go > Home).
2. Select the Music/Music folder. Then select Get Info.
3. If needed, unlock the section by entering your administrator password.
4. Click your user name in the Name column. Then change permissions to read & write.
And then open the Music app and test your problem.
Please note that if you are having this problem on your Windows computer, it is possible that corrupted files may cause this. What you can do is to run CHKDSK to check for disk errors.
See also:
“3. This will open your Home folder. Then open the Music folder. Then again open the Music folder. Click Media.”
There is no ‘Media’ to click, there’s only ‘Music Library’.