提交 75f88da4 编写于 作者: N Ning Yu

packcore: add missing libraries for ubuntu

When listing shared libraries with the ldd command we have to add some
missing libraries like `libgcc_s.so.1` and `libnss_files.so.2`, they
have different paths on centos and ubuntu, we should search for them on
all possible paths.

(cherry picked from commit dbeba12e)
上级 67594f17
......@@ -67,8 +67,23 @@ def _getLibraryListWithLDD(binary):
# We manually seed this with a few libraries that are missed
# This may not be needed for all proces, but will round out the
# postgres binary debugging
# TODO: Look a ways to distinguise a 32 vs. 64 bit executable
libraries = ['/lib64/libgcc_s.so.1', '/lib64/libnss_files.so.2', '/lib/libgcc_s.so.1', '/lib/libnss_files.so.2']
# TODO: Look at ways to distinguish a 32 vs. 64 bit executable
libraries = [
# on centos
'/lib64/libgcc_s.so.1',
'/lib64/libnss_files.so.2',
'/lib/libgcc_s.so.1',
'/lib/libnss_files.so.2',
# on ubuntu
'/lib/x86_64-linux-gnu/libgcc_s.so.1',
'/lib/x86_64-linux-gnu/libnss_files.so.2',
'/usr/lib32/libgcc_s.so.1',
'/lib32/libnss_files.so.2',
'/usr/libx32/libgcc_s.so.1',
'/libx32/libnss_files.so.2',
]
ldd_output = Popen('ldd `which postgres`', shell=True, stdout=PIPE)
for line in ldd_output.stdout:
match = re.search(r'(\S+) \(0x', line)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册