tmux 编译安装过程

按照 tmux 文档进行编译
git clone https://github.com/tmux/tmux.git
cd tmux
sh autogen.sh
./configure && make

configure 失败
configure: error: "libevent not found"

查阅相关 issue ./configure: libevent not found #1084, 安装依赖 libevent, libevent-dev
sudo rpm -ivh http://repo.superred.com.cn/altarch/7.7.1910/os/mips64el/Packages/libevent-2.0.21-4.lns7.mips64el.rpm
sudo rpm -ivh http://repo.superred.com.cn/altarch/7.7.1910/os/mips64el/Packages/libevent-devel-2.0.21-4.lns7.mips64el.rpm

依然失败, 安装依赖 ncurses, ncurses-dev
sudo rpm -ivh http://repo.superred.com.cn/altarch/7.7.1910/os/mips64el/Packages/ncurses-base-5.9-14.20130511.lns7.noarch.rpm
sudo rpm -ivh http://repo.superred.com.cn/altarch/7.7.1910/os/mips64el/Packages/ncurses-libs-5.9-14.20130511.lns7.mips64el.rpm
sudo rpm -ivh http://repo.superred.com.cn/altarch/7.7.1910/os/mips64el/Packages/ncurses-devel-5.9-14.20130511.lns7.mips64el.rpm

make 步骤失败
./etc/ylwrap:行177: yacc: 未找到命令
make: *** [cmd-parse.c] 错误 127

查询相关 issue configure script should check for yacc #1947, 安装依赖 bison, bison-dev, flex, flex-dev
sudo rpm -ivh http://repo.superred.com.cn/altarch/7.7.1910/os/mips64el/Packages/bison-3.0.4-2.lns7.mips64el.rpm
sudo rpm -ivh http://repo.superred.com.cn/altarch/7.7.1910/os/mips64el/Packages/bison-devel-3.0.4-2.lns7.mips64el.rpm
sudo rpm -ivh http://repo.superred.com.cn/altarch/7.7.1910/os/mips64el/Packages/flex-2.5.37-6.lns7.mips64el.rpm
sudo rpm -ivh http://repo.superred.com.cn/altarch/7.7.1910/os/mips64el/Packages/flex-devel-2.5.37-6.lns7.mips64el.rpm

重新运行, 仅输出警告, 安装成功
./configure && make
sudo make install
微信截图_20200707111113.png

3 个评论

還是裝loongnix倉庫裡的tmux吧
是的,通过 yum search 可能查找不到 dev 包
yum search tmux | grep dev
输出的列表里dev

要回复文章请先登录注册