"cannot find error -lreadline" when compiling Lua

This should be a pretty simple problem - I'm trying to compile Lua (or rather lua-vec, which is a minor option) to install CentOS Linux, and I get the following error:

[jt@flyboy src]#make linux
make all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
make[1]: Entering directory `/jt/flyboy/fly/lua/lua-vec/src'
gcc -o lua  lua.o liblua.a -lm -Wl,-E -ldl -lreadline -lhistory -lncurses
/usr/bin/ld: cannot find -lreadline
collect2: ld returned 1 exit status
make[1]: *** [lua] Error 1

This means that the readline library is not installed. But...

[jt@flyboy src]#ls /usr/lib/libreadline*
/usr/lib/libreadline.so.5  /usr/lib/libreadline.so.5.1

Interestingly, if I reorder the readline / history / ncurses order, depending on what initially causes the same error, so I suspect that this is some kind of problem with setting the folder, not a problem with the library.

Any ideas?


yum install readline-devel.x86_64 readline-devel.i386 ncurses-devel.i386 ncurses-devel.x86_64  

seems to have done the trick! It is strange that I collected it before without these libraries ... but enough time to reflect on the secrets of life ...

+4
source share
1

libreadline , , readline. libreadline-dev , readline .

Red Hat, , - readline-devel

:

$ yum install -y readline-devel
+10

Source: https://habr.com/ru/post/1751072/


All Articles