Linuxbrew-core: lua: error while loading shared libraries: libreadline.so.7

Created on 14 Jan 2019  路  1Comment  路  Source: Homebrew/linuxbrew-core

  • [x] have a problem with brew install (or upgrade, reinstall) a single formula? If it's a general brew problem please file this issue at Linuxbrew/brew: https://github.com/Linuxbrew/brew/issues/new/choose. If it's a tap (e.g. Brewsci/homebrew-bio) problem please file this issue at the tap.
  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • [x] if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

Steps to reproduce the error

$ docker  run -it centos:7.4.1708 /bin/bash
$ yum update -y
$ yum groupinstall 'Development Tools' -y
$ yum install which -y
$ adduser linuxbrew
$ su - linuxbrew
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
$ export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
$ export PATH="/home/linuxbrew/.linuxbrew/sbin:$PATH"
$ which lua
~/.linuxbrew/bin/lua
$ lua
lua: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory

Likely reason

Lua bottle has been linked to readline7 but brew provides readline8 and CentOS 7.4.1708 provides readline6 only.

Additional information

Brew and system

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
  /bin/pkg-config

$ brew gist-logs lua
Error: No logs.

$ file /lib64/libreadline.so.6
/lib64/libreadline.so.6: symbolic link to `libreadline.so.6.2'
$ file /lib64/libreadline.so.6.2
/lib64/libreadline.so.6.2: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=c9749982a65b18cf37f97ff0d31f67e584cf759d, stripped
$ ls ~/.linuxbrew/lib/ | grep readline
libreadline.a
libreadline.so
libreadline.so.8
libreadline.so.8.0

Installing Lua by compiling its source

$ brew uninstall lua
$ brew install -s lua
==> Downloading https://www.lua.org/ftp/lua-5.3.5.tar.gz
######################################################################## 100.0%
==> Downloading https://gist.githubusercontent.com/iMichka/dfc8617c85c1a6c21ca22240d4f5407b/raw/0dfef35c31fa41de0bface13e9c9f6ea09bd89fa/lua-5.3.5.patch
######################################################################## 100.0%
==> Patching
==> Applying lua-5.3.5.patch
patching file Makefile
Hunk #1 succeeded at 46 with fuzz 1.
patching file Makefile
patching file src/Makefile
==> make linux INSTALL_TOP=/home/linuxbrew/.linuxbrew/Cellar/lua/5.3.5_1 INSTALL_INC=/home/linuxbrew/.linuxbrew/Cellar/lua/5.3.5_1/include/lua INSTALL_MAN=/home/linuxbrew/.l
Last 15 lines from /home/linuxbrew/.cache/Homebrew/Logs/lua/01.make:
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/lib/libreadline.so: undefined reference to `tputs'
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/lib/libreadline.so: undefined reference to `tgoto'
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/lib/libreadline.so: undefined reference to `tgetflag'
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/lib/libreadline.so: undefined reference to `UP'
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/lib/libreadline.so: undefined reference to `tgetent'
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/lib/libreadline.so: undefined reference to `tgetnum'
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/lib/libreadline.so: undefined reference to `PC'
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/lib/libreadline.so: undefined reference to `tgetstr'
/home/linuxbrew/.linuxbrew/bin/ld: /home/linuxbrew/.linuxbrew/lib/libreadline.so: undefined reference to `BC'
collect2: error: ld returned 1 exit status
make[2]: *** [luac] Error 1
make[2]: Leaving directory `/tmp/lua-20190114-31218-4a8it6/lua-5.3.5/src'
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/tmp/lua-20190114-31218-4a8it6/lua-5.3.5/src'
make: *** [linux] Error 2

READ THIS: https://github.com/Linuxbrew/brew/wiki/troubleshooting
bug outdated

Most helpful comment

Hi. Thanks for reporting this. I will rebuild the bottle here: #11229

>All comments

Hi. Thanks for reporting this. I will rebuild the bottle here: #11229

Was this page helpful?
0 / 5 - 0 ratings