This is our old Q&A Site. Please post any new questions and answers at


I just installed Wireshark 1.12.4 on my MacBook Pro, went to start it and it immediately crashed. From the crash report, I see the following report about missing files:

Dyld Error Message: Library not loaded: /usr/X11/lib/libcairo.2.dylib Referenced from: /Applications/ Reason: image not found

I have XQuartz installed and there is no /usr/X11 directory even though all of the X11 parts and pieces work fine. So, is 1.12.4 the wrong version of Wireshark for my machine, or is there a different X11 package that I should install instead of XQuartz?

Thanks, Rob

asked 06 Apr '15, 10:08

caspersgrin's gravatar image

accept rate: 0%

The September and October entries have the issue identified. I didn't pay attention at first because of the poster's spelling. The solution is also silly. Why uninstall two packages and reinstall them just to get a sym link?

I had the crash problem as well but my directory structure is different from what was posted: usr/X11R6 1 (A completely different name for the X11 directory.) opt/X11 Both exist on the machine.

Relevant parts of the report: OS Version: Mac OS X 10.10.2 (14C1514) Application Specific Information: dyld: launch, loading dependent libraries

Dyld Error Message: Library not loaded: /usr/X11/lib/libcairo.2.dylib Referenced from: /Applications/ Reason: image not found

However, libcairo.2.dylib exists at usr/X11/lib/

I suppose my problem is I can't understand what my crashlog is kindly telling me. I think X Quartz is telling us that the X11 folder is really the X11R6 1 folder that doesn't have the necessary files in it. Creating the symbolic link cured the issue: sudo ln -s /opt/X11 /usr/X11

(09 Apr '15, 07:58) bob_calder

I have XQuartz installed and there is no /usr/X11

There shouldn't be.

What there should be is a /opt/X11 directory, and a /usr/X11 symbolic link to it.

$ ls -ld /opt/X11
drwxr-xr-x  8 root  wheel  272 Aug 11  2014 /opt/X11
$ ls -ld /usr/X11
lrwxr-xr-x  1 root  wheel  8 Oct 17 12:50 /usr/X11 -> /opt/X11

So you need to, as bob_calder notes, do sudo ln -s /opt/X11 /usr/X11.

In response to his comments:

There should, in addition to the /usr/X11 symbolic link, be a /usr/X11R6 symbolic link.

$ ls -ld /usr/X11R6
lrwxr-xr-x  1 root  wheel  8 Oct 17 12:50 /usr/X11R6 -> /opt/X11

(all three commands run, for what it's worth, on a Yosemite (virtual) machine). So both symbolic links should exist.

I'm not sure what "X11R6 1" is, here. Is it a folder whose name is "X11R6", followed by a space, followed by "1", or is it a folder whose name is "X11R6.1"? And is it truly a folder, or just a symbolic link? What does ls -ld /usr/X11* print?

The XQuartz installer will install XQuartz under /opt/X11, and should make the two symbolic links - /usr/X11 and /usr/X11R6 - point to /opt/X11.

The Yosemite installer, when used to upgrade from an earlier OS X release to Yosemite, will, unfortunately, remove the /usr/X11 symbolic link and not put it back; I don't know whether it'll also remove the /usr/X11R6 symbolic link.

What the crashing is telling you is that you need to do sudo ln -s /opt/X11 /usr/X11. XQuartz isn't telling you anything; the OS X run-time linker is telling you that it couldn't find anything in /usr/X11/lib/libcairo.2.dylib. If you did sudo ln -s /opt/X11 /usr/X11, then /usr/X11 didn't exist before you did that, so /usr/X11/lib/libcairo.2.dylib didn't exist before you did that. Perhaps /usr/X11R6/lib/libcairo.2.dylib existed before you did that, but that's not the path being used, so it doesn't matter.

So the folder in question is neither /usr/X11 nor /usr/X11R6, it's /opt/X11, and that folder does have the relevant files in it. There need to be symbolic links to /opt/X11 to allow programs built with the old built-in X11 - which did exist in a /usr/X11 folder, with /usr/X11R6 being a symbolic link to /usr/X11 - continue to work with XQuartz. (Building with XQuartz, in a fashion that directly looks in /opt/X11, would produce programs that won't work with the old built-in X11.)

I.e., the problem has nothing to do with "the X11 folder" or "the X11R6 folder" or "the X11R6 1" folder or "the X11R6.1 folder" not having the relevant files, it has something to do with /usr/X11 not existing at all. Nothing with "X11R6" in the name enters into it.

permanent link

answered 10 Apr '15, 14:37

Guy%20Harris's gravatar image

Guy Harris ♦♦
accept rate: 19%

Thanks! The "1" was separated by a space, so it's possible there was some sort of error after Yosemite update ran having to do with creating a new directory before the old one was deleted, then deleting the old one and not renaming the new one. No, it wasn't a sym link. Everything works since I created the new link, so at this point, it's just another example of Apple doing their own thing. :(

(10 Apr '15, 15:32) bob_calder

Programs in the higher levels of OS X try to deal with duplicate file names by giving the new file (or folder) a name with a blank and a number appended to it; perhaps /usr/X11R6 1 was created when there was already a /usr/X11R6 (folder or symbolic link) and a program was somehow trying to set up /usr/X11R6 and dealt with that by making /usr/X11R6 1.

In any case, Yosemite doesn't have its own built-in X11, so, on Yosemite with XQuartz, there should be a folder /opt/X11 with both /usr/X11 and /usr/X11R6 being symbolic links to /opt/X11.

(10 Apr '15, 20:03) Guy Harris ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 06 Apr '15, 10:08

question was seen: 2,860 times

last updated: 10 Apr '15, 20:03

p​o​w​e​r​e​d by O​S​Q​A