![AIX 7.1 Python3 安装:符号解析问题](https://linux22.com/image/222821/AIX%207.1%20Python3%20%E5%AE%89%E8%A3%85%EF%BC%9A%E7%AC%A6%E5%8F%B7%E8%A7%A3%E6%9E%90%E9%97%AE%E9%A2%98.png)
我正在尝试在我们的一个 AIX 操作系统上安装并运行 Python 3.9。
我使用 yum 安装 Python 3.9。
Current OS Level:
root@our_AIX_host:/opt/freeware/libexec > oslevel -s
7100-05-11-2246
最初,有一些未解决的路径问题,我必须通过添加到 PATH 和 LIBPATH 来纠正。
root@our_AIX_host:/opt/freeware/libexec > echo $LIBPATH
/usr/lib:/usr/local/lib:/opt/freeware/lib64
root@our_AIX_host:/opt/freeware/libexec > echo $PATH
/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java8_64/jre/bin:/usr/java8_64/bin:/usr/local/bin:/erac/sysadmin/roster/bin:/usr/local/bin:/etc/emc/bin:/opt/LicenseUseManagement/bin:/opt/freeware/bin
当我尝试运行 python3 时:
root@our_AIX_host:/opt/freeware/libexec > python3
exec(): 0509-036 Cannot load program python3 because of the following errors:
0509-130 Symbol resolution failed for /usr/lib/libpython3.9.a[libpython3.9.so] because:
0509-136 Symbol _GLOBAL__AIXI_libintl_so (number 284) is not exported from
dependent module /usr/lib/libintl.a[libintl.so.8].
0509-136 Symbol _GLOBAL__AIXD_libintl_so (number 285) is not exported from
dependent module /usr/lib/libintl.a[libintl.so.8].
0509-026 System error: Error 0
0509-192 Examine .loader section symbols with the
'dump -Tv' command.
在得知 dnf 是 yum 的继承者后,我使用“dnf_aixtoolbox.sh”安装了 dnf。任何运行 dnf 的尝试都会导致以下结果:
root@our_AIX_host:/opt/freeware/libexec > dnf
exec(): 0509-036 Cannot load program /opt/freeware/libexec/python3.9_32 because of the following errors:
0509-130 Symbol resolution failed for /usr/lib/libpython3.9.a(libpython3.9.so) because:
0509-136 Symbol _GLOBAL__AIXI_libintl_so (number 281) is not exported from
dependent module /usr/opt/rpm/lib/libintl.a(libintl.so.8).
0509-136 Symbol _GLOBAL__AIXD_libintl_so (number 282) is not exported from
dependent module /usr/opt/rpm/lib/libintl.a(libintl.so.8).
0509-026 System error: Error 0
0509-192 Examine .loader section symbols with the
'dump -Tv' command.
我确实运行了下面的代码,坦率地说,我不明白如何对这里的输出进行故障排除。我认识到“libintl.so.8”是上述两个输出之间的共性,但我不明白它到底想告诉我什么。
root@our_AIX_host:/opt/freeware/libexec > dump -Tv -X32_64 python3
我提供了上述命令输出的最后 10 行,因为总共约有 1700 行。如果需要,我可以提供更多:
[1670] 0x00000000 undef ImpExp DS EXTref libpython3.9.a(libpython3.9.so) _Py_Sigset_Converter
[1671] 0x00000000 undef ImpExp DS EXTref libpython3.9.a(libpython3.9.so) _PyErr_CheckSignals
[1672] 0x00000000 undef ImpExp DS EXTref libpython3.9.a(libpython3.9.so) PyErr_SetInterrupt
[1673] 0x00000000 undef ImpExp DS EXTref libpython3.9.a(libpython3.9.so) PyOS_InitInterrupts
[1674] 0x00000000 undef ImpExp DS EXTref libpython3.9.a(libpython3.9.so) PyOS_InterruptOccurred
[1675] 0x00000000 undef ImpExp DS EXTref libpython3.9.a(libpython3.9.so) _PyOS_IsMainThread
[1676] 0x00000000 undef ImpExp DS EXTref libpython3.9.a(libpython3.9.so) PyTraceMalloc_Track
[1677] 0x00000000 undef ImpExp DS EXTref libpython3.9.a(libpython3.9.so) PyTraceMalloc_Untrack
[1678] 0x00000000 undef ImpExp DS EXTref libpython3.9.a(libpython3.9.so) _PyTraceMalloc_GetTraceback
[1679] 0x00000000 undef IMP DS EXTref libintl.a(libintl.so.8) _GLOBAL__AIXI_libintl_so
[1680] 0x00000000 undef IMP DS EXTref libintl.a(libintl.so.8) _GLOBAL__AIXD_libintl_so
[1681] 0x20000ff8 .data ENTpt DS SECdef [noIMid] __start
预先感谢您的帮助。
答案1
来自现已删除的评论洛林奇·齐格蒙德:
您可以尝试重新排序 LIBPATH:
/usr/local/lib:/opt/freeware/lib64:/usr/lib