Skip to content

基于 Homebrew 的 bottle 机制在 Catanalina 安装 tmux #48

@creamidea

Description

@creamidea

tmux 的 bottle

前往 https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/ 在页面查找 tmux
image

使用 otool 工具查看动态依赖的动态链接库
image

动态链接库可以继续在 https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/ 上查找。找到之后解压,将其中的 lib 文件夹按照 /usr/local/opt/[lib-name] 的形式存放,比如

image

接下来使用 install_name_tool 命令进行动态链接库地址修改。

install_name_tool -change @@HOMEBREW_PREFIX@@/opt/utf8proc/lib/libutf8proc.2.dylib /usr/local/opt/utf8proc/lib/libutf8proc.2.dylib ./tumx
install_name_tool -change @@HOMEBREW_PREFIX@@/opt/ncurses/lib/libncursesw.6.dylib /usr/local/opt/ncurses/lib/libncursesw.6.dylib
install_name_tool -change @@HOMEBREW_PREFIX@@/opt/libevent/lib/libevent_core-2.1.7.dylib /usr/local/opt/libevent/lib/libevent_core-2.1.7.dylib

到这一步,tmux 程序已经可以运行,但是无法正常创建 session。出现如下错误 can't find terminfo database

解决 can't find terminfo database

最终问题通过这种方式解决:https://unix.stackexchange.com/a/677744
在 .zshrc 里面增加 export TERMINFO='/usr/share/terminfo/',可以顺利解决该问题

image

错误日志输出

运行 tmux -vvv -Ltest -f/dev/null new,可以在当前路径下获得如下日志文件
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions