Lua 5.2.x installed on CentOS 5.x error (MYLIBS=-lncurses)

简介:
在CentOS 5.x  中安装lua 5.2.3时遇到如下错误.
# make linux

gcc -o lua   lua.o liblua.a -lm -Wl,-E -ldl -lreadline 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `PC'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tgetflag'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tgetent'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `UP'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tputs'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tgoto'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tgetnum'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `BC'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
make[2]: *** [lua] Error 1
make[2]: Leaving directory `/opt/soft_bak/lua-5.2.3/src'
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/opt/soft_bak/lua-5.2.3/src'
make: *** [linux] Error 2


解决办法, 添加  MYLIBS=-lncurses
[root@db-172-16-3-39 lua-5.2.3]# make linux MYLIBS=-lncurses
cd src && make linux
make[1]: Entering directory `/opt/soft_bak/lua-5.2.3/src'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[2]: Entering directory `/opt/soft_bak/lua-5.2.3/src'
gcc -o lua   lua.o liblua.a -lm -Wl,-E -ldl -lreadline -lncurses
gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX    -c -o luac.o luac.c
gcc -o luac   luac.o liblua.a -lm -Wl,-E -ldl -lreadline -lncurses
make[2]: Leaving directory `/opt/soft_bak/lua-5.2.3/src'
make[1]: Leaving directory `/opt/soft_bak/lua-5.2.3/src'
[root@db-172-16-3-39 lua-5.2.3]# make install
cd src && mkdir -p /usr/local/bin /usr/local/include /usr/local/lib /usr/local/man/man1 /usr/local/share/lua/5.2 /usr/local/lib/lua/5.2
cd src && install -p -m 0755 lua luac /usr/local/bin
cd src && install -p -m 0644 lua.h luaconf.h lualib.h lauxlib.h lua.hpp /usr/local/include
cd src && install -p -m 0644 liblua.a /usr/local/lib
cd doc && install -p -m 0644 lua.1 luac.1 /usr/local/man/man1
[root@db-172-16-3-39 lua-5.2.3]# make test
src/lua -v
Lua 5.2.3  Copyright (C) 1994-2013 Lua.org, PUC-Rio

目录
相关文章
|
关系型数据库 MySQL Linux
【Linux环境】centos安装mysql5.7.26报 ./mysqld: error while loading shared libraries: libaio.so.1: cannot op
【Linux环境】centos安装mysql5.7.26报 ./mysqld: error while loading shared libraries: libaio.so.1: cannot op
282 0
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
10551 0
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
|
1月前
BUG!!!======> 编译安装lua 时 lua.c:67:31: fatal error: readline/readline.h: No such file or directory
BUG!!!======> 编译安装lua 时 lua.c:67:31: fatal error: readline/readline.h: No such file or directory
37 1
|
2月前
|
缓存 Linux 开发工具
CentOS7 安装KDE报错的解决方法:Loaded plugins:fastestmirror,langpacks There is no installed group.
CentOS7 安装KDE报错的解决方法:Loaded plugins:fastestmirror,langpacks There is no installed group.
|
Linux
Linux - Centos 8 执行 yum makecache fast 报错:yum makecache: error: argument timer: invalid choice: 'fast' (choose from 'timer')
Linux - Centos 8 执行 yum makecache fast 报错:yum makecache: error: argument timer: invalid choice: 'fast' (choose from 'timer')
967 0
|
5月前
|
网络协议 Linux 虚拟化
CentOS 8 错误: Error setting up base repository
CentOS 8 错误: Error setting up base repository
176 2
|
5月前
Centos8 Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:
Centos8 Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:
205 1
|
6月前
|
Linux
Centos7.4升级7.9失败,救援:/boot目录下文件丢失error: file ‘/initramfs-3.10.0-957.el7.x86_64.img‘ not found
以上步骤应该可以帮助你解决问题。如果问题仍然存在,可能需要更深入的排查。
174 1
|
6月前
centos6.0下Error:Connectionactivationfailed:DevicenotmanagedbyNetworkManager解决办法
centos6.0下Error:Connectionactivationfailed:DevicenotmanagedbyNetworkManager解决办法
166 0
|
缓存 Linux 开发工具
centos 7 yum安装失败(HTTP Error 404 - Not Found)的解决方法
centos 7 yum安装失败(HTTP Error 404 - Not Found)的解决方法
2487 0
下一篇
无影云桌面