Linux Install LUA related compilation error

Source: Internet
Author: User

1. Errors such as newspaper

/usr/lib/libreadline.so:undefined reference to ' PC '/usr/lib/libreadline.so:undefined reference to ' Tgetflag '/usr/lib /ibreadline.so:undefined reference to ' tgetent '/usr/lib/libreadline.so:undefined reference to ' up '/usr/lib/ libreadline.so:undefined reference to ' tputs '/usr/lib/libreadline.so:undefined reference to ' Tgoto '/usr/lib/ libreadline.so:undefined reference to ' Tgetnum '/usr/lib/libreadline.so:undefined reference to ' BC '

Solve:

readlinethe "Undefined compliance reference" error occurs because LUA compiles a dependent library and it relies on the ncurses library but is not specified. You need to modify ${LUA_DIR}/src/Makefile the Linux compiler target to append the '-lncurses ' option to the syslibs variable. After modification, the following:

Linux:

$ (make) $ (all) syscflags= "-dlua_use_linux" syslibs= "-wl,-e-ldl-lreadline-lncurses"

2, reported cannot find-lncurses

Solve:

Need to install ncurses yum install ncurses-devel 3, report lua.c:67:31:fatal error:readline/readline.h:no such file or directory address:
Description Missing Libreadline-dev Dependency package Centos:yum install Readline-develdebian:apt-get install Libreadline-dev.

Linux Install LUA related compilation error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.