-
-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
描述问题
在 Fedora 43 (Lua 5.4.8) 环境下使用 ltui 时,中文字符显示为 ASCII 转义序列(如 M-eM-...),无法正常显示中文。
排查发现原因是底层的 lcurses 库未正确安装或链接 ncursesw(宽字符支持)。在尝试解决依赖问题时遇到死循环:
- 默认安装失败:直接运行
luarocks install ltui,会自动下载lcurses 6-2版本,但该版本的configure脚本不支持 Lua 5.4(检查版本范围报错)。 - 指定版本失败:尝试安装支持 Lua 5.4 的
lcurses 9.0.0,但 Luarocks 索引中找不到该版本。 - 源码仓库失效:尝试寻找社区推荐的兼容分支
github.com/lunit/lcurses,但该仓库返回 404 Not Found。 - 系统包缺失:Fedora 官方源中没有提供
lua-curses或lua-lcurses包。
目前无法在 Fedora 43 + Lua 5.4.8 环境下构建正常的 lcurses 依赖,导致无法使用 ltui。
期待的结果
希望能更新 rockspec 依赖配置,指向一个目前仍在维护、且支持 Lua 5.4 和 ncursesw 的 lcurses 分支/版本。或者提供在 Lua 5.4 环境下手动编译兼容依赖的指引。
错误信息
1. 默认安装 lcurses 6-2 时的报错(Lua 版本不匹配):
$ sudo luarocks install lcurses
...
checking for lua... /usr/sbin/lua
checking Lua version is in range 501 <= v < 502... no
configure: error: in `/tmp/luarocks_lcurses-6-2...`:
configure: error: Lua version not in desired range.
2. 尝试克隆兼容版源码时的报错(仓库不存在):
$ git clone [https://github.com/lunit/lcurses.git](https://github.com/lunit/lcurses.git)
remote: Repository not found.
致命错误:仓库 '[https://github.com/lunit/lcurses.git/](https://github.com/lunit/lcurses.git/)' 未找到
3. 运行时表现:
TUI 界面边框错位,中文字符显示为乱码(M-eM-.)。
相关环境
- OS: Fedora Linux 43
- Lua: 5.4.8
- Shell: Fish Shell
- Terminal: xterm-256color
- Luarocks: Installed via dnf
其他信息
已尝试手动指定 Fedora 的宽字符头文件路径,但因找不到兼容 Lua 5.4 的源码包而无法继续:
sudo luarocks install lcurses NCURSES_INCDIR=/usr/include/ncursesw NCURSES_LIBDIR=/usr/lib64
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels