故障排查
本页列出常见失败模式和优先检查项。
安装后报 GLIBC_2.xx' not found
Section titled “安装后报 GLIBC_2.xx' not found”预编译的 glibc 动态链接 Linux 二进制在 GitHub ubuntu-latest 上构建,可能要求比旧发行版更高的 GLIBC。当前 cargo binstall sivtr 的 metadata 会为 linux-gnu 与 linux-musl 主机都下发 静态 musl 资源,新装一般不会再撞这个问题。
若仍是旧的 glibc 二进制(例如上次安装残留,或 crates.io 上的 metadata 尚未更新):
# 显式重装静态 musl 构建cargo binstall sivtr --targets x86_64-unknown-linux-musl
# 或curl -fsSL https://raw.githubusercontent.com/Ariestar/sivtr/main/install.sh | sh确认:
ldd "$(command -v sivtr)" # 静态 musl 通常显示 "not a dynamic executable"sivtr --versionsivtr copy out 找不到命令块
Section titled “sivtr copy out 找不到命令块”安装或升级 shell 集成后,需要重启 shell 才会开始记录命令块。
开启采集并检查环境:
sivtr init all# 或:sivtr init bash / zsh / nushell / powershellsivtr doctor若曾显式设置 [pty_proxy] enabled = false,先用 sivtr config edit 将其改回 true。
然后重启终端,运行一个命令,再尝试:
sivtr copy out --print如果 pipe mode 正常但 copy 不工作,问题通常在 session logging,而不是 browser。
Agent provider picker 为空
Section titled “Agent provider picker 为空”Provider picker 只显示当前工作区可发现的本地 session。
检查:
sivtr copy codex --picksivtr copy claude --picksivtr copy opencode --picksivtr copy pi --pick如果某个 provider 为空但另一个能用,问题通常是该 provider 的发现逻辑或本地数据缺失。如果全部为空,确认你是否在与 session 工作目录匹配的项目目录中运行。
从其他目录运行 search/show 时,使用 --cwd:
sivtr search agent --match "panic" --cwd /path/to/project --format timelineLinux 剪贴板复制失败
Section titled “Linux 剪贴板复制失败”剪贴板支持依赖桌面/session 环境。Wayland、X11、SSH 和 headless 环境行为可能不同。
先用 --print 验证文本本身:
sivtr copy out --printsivtr copy claude out --print如果打印文本正确但剪贴板为空,问题很可能在平台剪贴板集成,而不是选择或解析。
Windows 热键无法启动
Section titled “Windows 热键无法启动”检查状态:
sivtr hotkey status再尝试不同按键:
sivtr hotkey start --chord ctrl+shift+y如果注册失败,可能是其他应用已经占用了这个快捷键。
Linux 没有全局热键
Section titled “Linux 没有全局热键”这是预期行为。Linux 当前没有内置桌面级 sivtr daemon,因为 Wayland 和各桌面环境没有给普通 CLI 应用提供统一快捷键 API。
请改用:
sivtr init tmuxsivtr init linux-shortcut或使用 VS Code 扩展快捷键。
sivtr show <ref> 找不到 ref
Section titled “sivtr show <ref> 找不到 ref”Ref 是基于当前 workspace session list 解析的。如果你运行 show 的目录不同于原始搜索目录,传入相同的 --cwd:
sivtr search agent --match "panic" --cwd /path/to/project --format jsonsivtr show <ref> --cwd /path/to/project同时检查 ref source 是否存在,例如 codex、claude、opencode、pi 或 terminal。
Regex filter 匹配不到内容
Section titled “Regex filter 匹配不到内容”--regex 只保留匹配行。如果 pattern 无效或过窄,结果可能为空。
用 --print 和更简单的 pattern 调试:
sivtr copy out --regex error --printsivtr copy out --regex "error|failed" --print同时设置 --regex 和 --lines 时,--regex 先运行。
文档和 CLI 不一致
Section titled “文档和 CLI 不一致”已安装二进制的 CLI 是事实来源:
sivtr --helpsivtr version --verbosesivtr copy --helpsivtr copy claude --help如果网站描述的是更新命令,而你的二进制不支持,请更新 sivtr:
cargo install sivtr --force