Compile Lua in centos to support dynamic links.

Source: Internet
Author: User

When compiling Lua in Linux, I usually use make generic. In this way, compilation is fine and all programs running Lua are OK. However, this way, the external C dynamics are loaded.

Links to the library, but always reports the following errors

Dynamic libraries not enabled; check your Lua Installation

After searching the data for half a day, we finally found that if we use make generic to compile Lua, we could not dynamically link it.

Therefore, you can choose to use other platform parameters and make Linux for compilation to load external dynamic link libraries,

However, when you use make Linux, the system will report a missing Readline. h error, so you only need to go to the Readline official website.

Download the latest Readline package ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz

After downloading, go to the directory where the compressed package is downloaded,

Input tar-zxvf compressed package

Go to the decompressed directory. Enter./configure

After./configure is executed, run the make command.

After make is executed, enter make install. Note that you must enter the root permission when executing this step.

Run make Linux in The Lua source code directory.

At this time, the external dynamic link library will be loaded and everything will be OK.

Related Article

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.