1

I'm trying to debug a Webkit problem, and I seem to have botched my Safari installation: whenever I try to launch any version of Safari or Webkit, it crashes immediately with an error like this:

Dyld Error Message: Library not loaded: /System/Library/PrivateFrameworks/WebKit2.framework/Versions/A/WebKit2 Referenced from: /System/Library/StagedFrameworks/Safari/Safari.framework/Safari Reason: image not found

I wasn't able to reproduce my bug in my installed Safari (6.0.5 on Mountain Lion (10.8.4)) but I was on the Webkit nightly I downloaded and installed (r151773).

I was trying to pinpoint the Webkit revision where this became a problem, so I downloaded several more older nightlies, but when I tried launching any of those, they failed to launch with the error above. When I went back to the newer nightly, then to my original Safari, those were all showing the error as well.

I can't find an installer to reinstall Safari 6.0.5. In this answer I found a route to download and install a developer build of Safari 6.1, but that also fails to launch with the same error.

How can I restore my Safari? And, once I get Safari back, is there a way to try several nightlies of Webkit so I can narrow down the scope of the change which created my problem?

  • It looks like your Safari is looking for a file in a wrong directory? Could you verify the location of the Webkit ? – Ruskes Jun 20 '13 at 19:47
  • dhcp168:~ pmorse$ ls -l /System/Library/PrivateFrameworks/WebKit2.framework/Versions/A/WebKit2 ls: /System/Library/PrivateFrameworks/WebKit2.framework/Versions/A/WebKit2: No such file or directory – pjmorse Jun 20 '13 at 19:53
  • so where is the webkit ? – Ruskes Jun 20 '13 at 19:55
  • ...and yet: dhcp168:~ pmorse$ ls -l /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit -rwxr-xr-x 1 root wheel 4510928 Jun 11 10:26 /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit – pjmorse Jun 20 '13 at 19:57
  • so u have older version of webkit installed, but not the webkit2 ? I found only way to get Safari 605 is true bundle :( support.apple.com/kb/DL1658 – Ruskes Jun 20 '13 at 20:12
1

You could try doing an upgrade install of OS X from the recovery partition. It should replace preinstalled frameworks and applications with the initial versions but keep user files and settings in place. I have done it twice so far and it solved multiple issues both times, so I have started to recommend it as a troubleshooting step here, even though no-one ever does it.

Another way to restore the directories for Safari or frameworks might be to copy them from a VM.

  • I'll give this a try and see how it works. – pjmorse Jun 21 '13 at 14:56
  • It worked, but took quite a while (~75 minutes) which seems like quite a process for (ultimately) reinstalling one app. – pjmorse Jun 21 '13 at 17:13
  • Pacifist does this nicely, in whatever parts of system and apps you want. charlessoft.com – Zo219 Jun 23 '13 at 2:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .