MacOS – Unable to install iTunes 12.2

itunesmac-appstoremacos

(2011 MacBook Pro running Yosemite 10.10.4)

The App Store offered me the update to iTunes 12.2 as normal when it was released. I clicked install, it downloaded the update, and it appeared in the list of recently installed updates, apparently all as it should be. However, when I run iTunes it's still version 12.1.

The update will appear again in the App Store update window eventually, but the outcome is always the same. I now have seven updates to iTunes 12.2 showing in the App Store, none of which has actually worked.

I tried downloading the installer from the Apple website, which gets right to the end of the install process before giving this error message:

enter image description here

I also tried removing my existing iTunes installation via the Terminal. Running the installer after doing this gives the same error message, while installing it via the MAS after removing it appears to install successfully but leaves no iTunes app in the Applications folder.

I've since successfully installed updates to non-Apple apps via the App Store with no problem; all are correctly updated to the latest versions.

Huge thanks in advance to anyone who can help.

Best Answer

Looking at the install.log you pasted, one line jumped out at me:

Jul 6 10:46:49 Olly.local installd[661]: preinstall: perl: posix_spawn: /usr/bin/perl5.18: Exec format error

I think that error says that the installer tried to run the preinstall script using the system Perl, but that the system Perl could not even be executed. Could you please run the command file /usr/bin/perl5.18 and tell us what you get? Here's what I get:

localhost:~ user$ file /usr/bin/perl5.18
/usr/bin/perl5.18: Mach-O universal binary with 2 architectures
/usr/bin/perl5.18 (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/perl5.18 (for architecture i386): Mach-O executable i386

This is a basic hello-world program in Perl; once you get this working on your computer, I think your installer will work fine too.

localhost:~ user$ /usr/bin/perl5.18 -e 'print "hello, world!\n";'
hello, world!