Skip to content

Commit bc0e6ba

Browse files
Fix for OS X El Capitan: LoadLibrary('libc.dylib') failed.
1 parent aa2e196 commit bc0e6ba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pymux/darwin.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ def _init():
4343
global LIBC
4444

4545
if LIBC is None:
46-
LIBC = cdll.LoadLibrary('libc.dylib')
46+
try:
47+
LIBC = cdll.LoadLibrary('libc.dylib')
48+
except OSError:
49+
# On OS X El Capitan, the above doesn't work for some reason and we
50+
# have to explicitely mention the path.
51+
# See: https://github.com/ffi/ffi/issues/461
52+
LIBC = cdll.LoadLibrary('/usr/lib/libc.dylib')
4753

4854

4955
def get_proc_info(pid):

0 commit comments

Comments
 (0)