diff --git a/libs/libcommon/src/LineReader.cpp b/libs/libcommon/src/LineReader.cpp index 3de6e43cb27..ab63ccc0f19 100644 --- a/libs/libcommon/src/LineReader.cpp +++ b/libs/libcommon/src/LineReader.cpp @@ -162,9 +162,16 @@ LineReader::InputStatus LineReader::readOneLine(const String & prompt) } else { - void * dl_handle = dlopen("libreadline.so", RTLD_LAZY); - if (dl_handle) - readline_ptr = reinterpret_cast(dlsym(dl_handle, "readline")); + for (auto name : {"libreadline.so", "libreadline.so.0", "libeditline.so", "libeditline.so.0"}) + { + void * dl_handle = dlopen(name, RTLD_LAZY); + if (dl_handle) + { + readline_ptr = reinterpret_cast(dlsym(dl_handle, "readline")); + if (readline_ptr) + break; + } + } } }