Fixing LaunchServices on OSX
February 5, 2009 1:58 PM   Subscribe

Is there any way to fix/replace/reinstall LaunchServices in OS X? (Also: is my Powerbook doomed?)

My old PPC 12" Powerbook (10.4.11) is suddenly unable to open .dmg files or start programs. (Programs that are already open still work.) I get a "Broken Pipe" error when trying to open .dmg files; the error reports generated and sent to Apple say that LaunchServices is essentially missing:

Link (dyld) error:

image not found /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/LaunchServices


In the LaunchServices.framework folder, all three files (LaunchServices, Resources, and Support) are actually aliases, and these aliases are no longer pointing anywhere. There's also a folder, Versions. Within that folder, the single file (Current) is also an alias that's now pointing to nothing. There's a single folder as well, A. This folder contains what appear to be the real LaunchServices file and Resources/Support folders. Attempts to redirect the broken aliases to these files seem to be failing.

Standard OSX diagnostics are currently impossible to run, because diagnostics require programs, and launching programs requires LaunchServices. I do not currently have easy access to my original install disc. I haven't tried rebooting, because I'm concerned that I won't be able to start any programs at all if I do.

Is there any way I can fix or reinstall LaunchServices? Failing that, is there any workaround that I can use to run diagnostics and figure out if this is an isolated error that might be fixable with a new install, or whether it's ultimately hardware-related and my Powerbook's about to die?
posted by ubersturm to Computers & Internet (10 answers total)
 
Do you have Terminal running?
posted by zsazsa at 2:20 PM on February 5, 2009


Can you open Terminal? I'm curious to see what shows up for the aliases there.
ls -l /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework
ls -lR /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Versions/*


What error are you getting when you try to redirect the aliases? Are you doing this through the Finder?
posted by mkb at 2:23 PM on February 5, 2009


LaunchServices alias pointers broken will not be a hardware issue. Simplest fix would be to archive and install, preserving - of course, this assumes you have your tiger install media. Reinstalling separately would require fairly intimate knowledge of the installer packages, and some command line savvy, and even then I'm not sure it would be entirely effective.
posted by fearnothing at 2:35 PM on February 5, 2009


Response by poster: Here're the results, and yes, I was trying to switch the alias pointers to the files in the ~/Versions/A/ directory via Finder (not actually sure how to edit them in a shell, since "file exists but cannot be read" when I try to open 'em with emacs); I got no errors but nothing changed. It's my understanding that file corruption/etc. is occasionally a sign of an unhappy hard drive; thus my concern about the possibility of a hardware cause.

ubersturm% ls -l /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework
total 24
lrwxr-xr-x 1 root wheel 31 May 1 2007 LaunchServices -> Versions/Current/LaunchServices
lrwxr-xr-x 1 root wheel 26 May 1 2007 Resources -> Versions/Current/Resources
lrwxr-xr-x 1 root wheel 24 May 1 2007 Support -> Versions/Current/Support
drwxr-xr-x 4 root wheel 136 May 1 2007 Versions

ubersturm% ls -lR /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Versions/*
lrwxr-xr-x 1 root wheel 1 May 1 2007 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Versions/Current -> <>
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Versions/A:
total 776
-rwxr-xr-x 1 root wheel 394264 Dec 25 12:58 LaunchServices
drwxr-xr-x 19 root wheel 646 May 1 2007 Resources
drwxr-xr-x 4 root wheel 136 Mar 20 2005 Support

/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Versions/A/Resources:
total 16
drwxr-xr-x 4 root wheel 136 Feb 25 2005 Dutch.lproj
drwxr-xr-x 4 root wheel 136 Apr 25 2005 English.lproj
drwxr-xr-x 4 root wheel 136 Feb 25 2005 French.lproj
drwxr-xr-x 4 root wheel 136 Feb 25 2005 German.lproj
-rw-r--r-- 1 root wheel 1188 Dec 20 2006 Info.plist
drwxr-xr-x 4 root wheel 136 Feb 25 2005 Italian.lproj
drwxr-xr-x 4 root wheel 136 Feb 25 2005 Japanese.lproj
drwxr-xr-x 4 root wheel 136 Feb 25 2005 Spanish.lproj
drwxr-xr-x 4 root wheel 136 Jan 20 2005 da.lproj
drwxr-xr-x 4 root wheel 136 Jan 20 2005 fi.lproj
drwxr-xr-x 4 root wheel 136 Jan 20 2005 ko.lproj
drwxr-xr-x 4 root wheel 136 Jan 20 2005 no.lproj
drwxr-xr-x 4 root wheel 136 Jan 20 2005 pt.lproj
drwxr-xr-x 4 root wheel 136 Dec 27 2004 sv.lproj
-rw-r--r-- 1 root wheel 463 Feb 19 2007 version.plist
drwxr-xr-x 4 root wheel 136 Jan 20 2005 zh_CN.lproj
drwxr-xr-x 4 root wheel 136 Jan 20 2005 zh_TW.lproj

posted by ubersturm at 2:52 PM on February 5, 2009


Best answer: What's this?

lrwxr-xr-x 1 root wheel 1 May 1 2007 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Versions/Current -> <>

If that isn't a copy and paste error, that's a busted symlink. It should point to A.

Out of curiosity though, before you do anything, what happens if you run lsof | grep Launch? Is there anything with the framework already open that could have a lock on the file?
posted by mkb at 3:02 PM on February 5, 2009


Best answer: Seconding mkb: it looks like the symlink from Current to A is broken.

% cd /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Versions
% sudo rm Current
% sudo ln -s A Current

Should fix it.
posted by zsazsa at 3:06 PM on February 5, 2009


Response by poster: I double-checked; note that Firefox is assuming the bit at the end is a tag and adding a right angle bracket where there should only be a left. Otherwise everything is as above; no mention of A.

My apologies for the length, lsof gives me the following:

ubersturm% lsof | grep Launch
pbs 295 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
pbs 295 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Dock 306 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Dock 306 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
SystemUIS 307 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
SystemUIS 307 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Finder 308 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Finder 308 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Finder 308 ubersturm 18r VDIR 14,2 204 5344 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework
Finder 308 ubersturm 25r VDIR 14,2 136 5348 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions
Finder 308 ubersturm 26r VDIR 14,2 170 5349 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A
Terminal 404 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Terminal 404 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Dashboard 2323 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Dashboard 2323 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Dashboard 2324 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Dashboard 2324 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Dashboard 2325 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Dashboard 2325 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Dashboard 2326 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Dashboard 2326 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Dashboard 2327 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Dashboard 2327 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Dashboard 2328 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Dashboard 2328 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Dashboard 2329 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Dashboard 2329 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
TextEdit 2631 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
TextEdit 2631 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Preview 2847 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Preview 2847 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
firefox-b 8656 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
firefox-b 8656 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Skype 8769 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Skype 8769 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Microsoft 9111 ubersturm txt VREG 14,2 18420 6454 /System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp
Microsoft 9111 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Microsoft 9111 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
Microsoft 9112 ubersturm txt VREG 14,2 18420 6454 /System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp
Crash\x20 9856 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
Crash\x20 9856 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
mdimport 9864 ubersturm txt VREG 14,2 2777088 2692794 /Library/Caches/com.apple.LaunchServices-014501.csstore
mdimport 9864 ubersturm txt VREG 14,2 394264 2549600 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
tcsh 9866 ubersturm cwd VDIR 14,2 204 5344 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework
lsof 9913 ubersturm cwd VDIR 14,2 204 5344 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework
grep 9914 ubersturm cwd VDIR 14,2 204 5344 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework

posted by ubersturm at 3:15 PM on February 5, 2009


Response by poster: Yup, fixing the symlink seems to have done the trick. You guys are awesome.

(Secret bonus question: given that I haven't recently installed/updated anything, and that OS X is generally pretty good about not letting programs screw with important system data (at least without requiring my password), what on earth nuked the symlink?)
posted by ubersturm at 3:50 PM on February 5, 2009


Hard drive could be dying.
posted by squorch at 4:59 PM on February 5, 2009


No idea, I would run a full array of disk checky things (Disk First Aid, Repair Permissions) and BACK UP PRONTO!
posted by mkb at 7:22 PM on February 5, 2009


« Older There's gotta be a Wordpress plugin for this   |   MySQL datetime insert Newer »
This thread is closed to new comments.