工具与资源github.com
Libtree:用树状图解释动态库为何被找到或找不到
Libtree: Ldd as a tree saying why a library is found or not
2021 — 2024,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
Libtree 是一个用来查看动态库依赖关系的命令行工具,它把 ldd 的输出组织成树状,并说明每个库是从哪里被找到的、或者为什么没找到。适合排查程序启动时缺失共享库、RPATH/LD_LIBRARY_PATH 等搜索路径问题。
为什么经久不衰:它把晦涩的动态链接解析过程变得直观可见,至今仍是调试 Linux 共享库依赖问题的实用小工具。
HN 评论精选
实际例子揭示了 vim 出人意料的传递依赖,工具很直观。
这让我了解到 vim 依赖 libcanberra,而 libcanberra 又依赖 libvorbisfile……再到 libogg。用 libtree 查看 vim 的依赖树后觉得很意外(这个工具非常巧妙,虽然有人提到 ldd 也能做一部分)。
agumonkey查看英文原文
Got me to learn that vim requires libcanberra requires libvorbisfile ... libogg ./libtree_x86_64 $(which vim) vim ├── libtinfo.so.6 [ld.so.conf] ├── libselinux.so.1 [ld.so.conf] │ └── libpcre2-8.so.0 [ld.so.conf] ├── libcanberra.so.0 [ld.so.conf] │ ├── libvorbisfile.so.3 [ld.so.conf] │ │ ├── libvorbis.so.0 [ld.so.conf] │ │ │ └── libogg.so.0 [ld.so.conf] │ │ └── libogg.so.0 (collapsed) [ld.so.conf] │ ├── libtdb.so.1 [ld.so.conf] │ └── libltdl.so.7 [ld.so.conf] ├── libacl.so.1 [ld.so.conf] ├── libgpm.so.2 [ld.so.conf] └── libpython3.8.so.1.0 [ld.so.conf] surprising (and super neat tool, even though people mentionned ldd could do part of it)
已有类似工具 lddtree.py,但 libtree 仍值得关注。
Gentoo 的 pax-utils 里的 lddtree.py 已经能做这件事了。不过看到这个还是很酷,非常有用。
totony查看英文原文
https://github.com/gentoo/pax-utils/blob/master/lddtree.py already does this. Cool to see though, very useful
Solaris 的 ldd -s 也提供依赖树和拒绝原因。
在 Solaris 上可以用 ldd -s <binary_name> 得到依赖树,它会显示每个依赖使用的搜索路径(LD_LIBRARY_PATH、该二进制的 RUNPATH、ld.config 文件),以及它拒绝某些已找到文件的原因,例如缺少符号版本。
joshuaissac查看英文原文
On Solaris, you can get the tree with: ldd -s <binary_name> It gives you the dependency tree, tells you the search paths it used for each dependency in the tree (LD_LIBRARY_PATH, the RUNPATH for the specific binary, and ld.config file), and the reason it rejected any files it did find, e.g. missing symbol version.
历次讨论
同类还值得读
直接在浏览器中启动 Linux 内核
Boot a linux kernel right inside your browser.
Fabrice Bellard 的 JSLinux 页面,用 JavaScript 在浏览器里启动一个 Linux 内核,并提供一个可交互的终端环境。
工具与资源上首页 5 次 · 2011–2025bellard.orgHacker News 未公开功能与行为清单(2018)
A List of Hacker News's Undocumented Features and Behaviors (2018)
数据科学家 Max Woolf 整理的 Hacker News 未公开功能与行为清单,涵盖投票机制、排名算法、账号惩罚等社区运作细节。
工具与资源上首页 5 次 · 2019–2025github.comMapSCII:在终端中用盲文和 ASCII 渲染地图
MapSCII – Braille and ASCII map renderer for the console
MapSCII 是一个在命令行终端里渲染地图的开源工具,用盲文字符和 ASCII 字符把地理数据画成可交互浏览的字符地图。
工具与资源上首页 5 次 · 2017–2025github.com顶尖大学的免费在线课程
Free Online Courses from Top Universities
Open Culture 整理的一份免费在线课程合集,汇集了全球顶尖大学(如 MIT、斯坦福、耶鲁等)向公众开放的网络课程资源,涵盖音频、视频等多种形式。
工具与资源上首页 5 次 · 2010–2022openculture.com淘气字符串:容易引发用户输入问题的字符串清单
Naughty Strings: A list of strings likely to cause issues as user-input data
一个 GitHub 仓库,收录了大量容易让程序出问题的用户输入字符串,如特殊字符、emoji、SQL 注入片段、系统命令等,供开发者用于测试输入处理逻辑。
工具与资源上首页 4 次 · 2015–2020github.com