You can’t open the application “iTunes” because it is being updated

Solution 1:

I have the same error message with XCode.

I deleted Xcode from Finder. Emptied the trash. Then installed XCode again from the App Store. (I cannot remove iTunes because it is disallowed by macOS)

Now both XCode and iTunes work again.