Created January 2003. Updated February 2004. There are NO GUARANTEES that this will work for you.

iTunes Error

The iTunes Music Library file cannot be read because it does not appear to be a valid library file

The Problem

AAAAAAIGH! I had been doing some advanced software installs (XDarwin) and did some royal system messing-with. Somehow, I managed to corrupt my iTunes. Terrible. Awful. I have 3376 mp3 files in my iTunes. Losing them would suck.

iTunes would simply not run.


But wait! Maybe there's a fix. But I couldn't find anything on the web.

XML Saved My Music

Here's what I did in my iTunes Folder:
Macintosh HD > Users > user > Music > iTunes

I made a new folder: (Apple-Shift-N)



iTunes 3 Music Library
iTunes Music Library.xml
iTunes Music Library (2) the new Backup folder

(( NOTE: SEVERAL RESPONSES I HAVE GOTTEN INDICATE REINSTALLING ITUNES IS *NOT* NECESSARY. Consider this step optional. If your recovery fails, reconsider adding it back))
Reinstall iTunes afresh <>

Then do: File > Import...

Import your library back: Backup/iTunes Music Library.xml

If you have a lot of music, it will take some time But this solved my problem. I got my music and my playlists back.

Calyxa suggested I show the path to the files, and I did. Thanks Calyxa!

On 27 November 2003 Mike Conlen sent in this suggestion, for iTunes for Windows:

In Windows to do the same look under
My Documents -> My Music -> iTunes
Move the files iTunes Music Library.xml and iTunes 4 Music Library.itl to the Desktop
Run iTunes
File -> Import
Change file type to XML and select the iTunes Music Library from your desktop
Wait while the files are imported.

Thanks Mike!