Index: Lib/ctypes/util.py =================================================================== --- Lib/ctypes/util.py (revision 65022) +++ Lib/ctypes/util.py (working copy) @@ -125,7 +125,7 @@ # assuming GNU binutils / ELF if not f: return None - cmd = "objdump -p -j .dynamic 2>/dev/null " + f + cmd = "/usr/bin/objdump -p -j .dynamic 2>/dev/null " + f res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read()) if not res: return None @@ -160,7 +160,7 @@ def _findLib_ldconfig(name): # XXX assuming GLIBC's ldconfig (with option -p) - expr = r'/[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) + expr = r'(/[^\(\)\s]*lib%s\.[^\(\)\s]*)' % re.escape(name) res = re.search(expr, os.popen('/sbin/ldconfig -p 2>/dev/null').read()) if not res: