Skip to main content
 首页 » 编程设计

python之"/lib64"与 "/lib/../lib64/"不同吗

2025年05月04日10bjzhanghao

在 gdb python 脚本/opt/gcc-4.8.2/lib64/libstdc++.so.6.0.18-gdb.py 中存在以下行

libdir = '/opt/gcc-4.8.2/lib/../lib64' 

它可能是 /opt/gcc-4.8.2/lib64。这对 bash 或 python 有什么影响吗?

请您参考如下方法:

当由不想依赖于 Linux 的 shell 脚本构建时,路径通常看起来像这样。在其他平台上规范化路径名(摆脱 ..)更加困难。 Like Solaris .

让路径保持原样不是问题。