meilisearch: v0.9.0 linux binary cannot run in CentOS7 / RHEL7

Hi,

I tried to download the v0.9.0 linux binary and run it. I see the following error -

./meilisearch-linux-amd64 
./meilisearch-linux-amd64: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./meilisearch-linux-amd64)

I have verifed that the required library does exist in my linux machine -

lrwxrwxrwx. 1 root root      12 Jun 24  2019 /lib64/libc.so.6 -> libc-2.17.so
-rwxr-xr-x. 1 root root 2151672 Apr  1  2019 /lib64/libc-2.17.so

I do not have root or privileged rights go alter in /lib64 dir.

Is there anything that I can do to run this binary?

Thank you,

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 24 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@peterpan666 thank you very much for your solution, hereby the dockerfile that worked for us to everyone that is interested:

# Use CentOS 7 as the base image
FROM centos:7

# Install system dependencies for building MeiliSearch, including development tools and C compiler
RUN yum -y update && \
    yum -y groupinstall "Development Tools" && \
    yum -y install git curl gcc openssl-devel centos-release-scl && \
    yum -y install devtoolset-7-gcc* && \
    yum clean all

# Enable devtoolset-7 for a newer GCC version that includes stdatomic.h
SHELL ["/usr/bin/scl", "enable", "devtoolset-7"]

# Install Rust (This might need to be updated depending on the best practices for installing Rust)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Clone the MeiliSearch repository
WORKDIR /usr/src
RUN git clone https://github.com/meilisearch/MeiliSearch.git
WORKDIR /usr/src/MeiliSearch

# Build MeiliSearch
RUN cargo build --release

# Expose the port MeiliSearch listens on
EXPOSE 7700

# Configure the container to run MeiliSearch, replace this with the actual path if different
CMD ["/usr/src/MeiliSearch/target/release/meilisearch"]

Hi again!

I got it to work smoothly without touching my server!

I installed Docker on my local computer.

Ran docker run -i -t centos:7

Installed librairies (yum install git, yum groupinstall 'Development Tools', …)

And followed steps from this repo to recompile from source https://github.com/meilisearch/MeiliSearch/tree/master#compile-and-run-it-from-sources

Transfered the binary file to my server and ran it.

It seems to work really great!

@Kerollmops - After some intense googling with trial-n-error, I was finally able to make Meilisearch work in RHEL-7. May be you can add these steps in the documentation or I can give a PR to the docs?

Step-1 Installed glibc 2.18 in a /my/customdir/ as per the gist https://gist.github.com/carlesloriente/ab3387e7d035ed400dc2816873e9089e (Only thing is that i just used make install instead of sudo make install as anyway this is my own custom dir)

Step-2 Used the following command - patchelf --set-interpreter /my/customdir/glibc-2.18/lib/ld-linux-x86-64.so.2 --set-rpath /my/customdir/glibc-2.18/lib:/usr/lib64 ./meilisearch-linux-amd64

Step-3 ./meilisearch-linux-amd64 😄

Hum… I think I understand but it means that the engine would interpret the documents of the Users index like filters of some kind.

Probably next week the engine will support more feature-full filters, this will make the engine be able to support this kind of usage. We will also rework and design a way more interresting authentication system that will probably be able to contain filters, this way the user will not be able ignore the filters applied at query time, those will be force because stored inside of the authentication token.

Hello @peterpan666 Yes it’s totally possible, if the community opens a PR, I’m available to review it 👍

However, regarding the really small number of CentOS users, we cannot afford to spend time doing maintenance if there are any issues with it. I hope you understand. Community will be needed in this case

It took between 5 to 10 mins to compile glibc 2.18 Btw, am new to rust and I was thinking that it is similar to go in terms of cross-compiled binaries. But may be not… ? Quick question on Meili - can we join 2 different indexes (this was added very late in Elastic - i think it was in 6.x) - but a very useful feature when it comes to search (with data authorization)

@Kerollmops - Thank you for the reply.

Yes, indeed am running this on RHEL-7 (most of the enterprises still use this version) - so it would be a pity if Meilisearch cannot run on this platform. This seems to be an issue with glibc 2.17 (default in CentOS 7) and looks like Meili needs glibc 2.18

cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
uname -mrs
Linux 3.10.0-1062.el7.x86_64 x86_64

I noticed that deno (another famous project based on rust) had a long discussion on this thread - https://github.com/denoland/deno/issues/1658 and recently seems to have resolved this with this - https://github.com/denoland/rusty_v8/issues/49

I will do some more research and see what comes out of that. Some workaround is described here - https://serverfault.com/questions/894625/safely-upgrade-glibc-on-centos-7/894689#894689