Ran into this on Nicole’s new laptop.
The reason was because I had used cygwin rsync to copy over our documents from the old laptop and the iTunes Library.itl file ended up getting marked as read-only.
macosxhints.com has this page on the top: Recover from a ‘Library is locked’ iTunes error
However, all I had to was simply clear the read-only attribute on the iTunes Library.itl file and that seemed to do the trick.
Had the same happen to me. Answer = Open C: and in turn right click on all the icons, select PROPERTIES, then GENERAL tab. Uncheck READ ONLY, click APPLY. It will then ask if you wish to apply to all Folders and Sub Folders, click YES. Some enbeded files will not allow the change, when prompted click IGNORE. At the end click OK……..Hey Presto all done.