kubectl-view-allocations icon indicating copy to clipboard operation
kubectl-view-allocations copied to clipboard

version `GLIBC_2.18' not found

Open salmon5 opened this issue 3 years ago • 8 comments

OS Version:CentOS Linux release 7.9.2009 (Core) Glibc Version:glibc-2.17-324.el7_9.x86_64 Pageage:kubectl-view-allocations_0.13.0-x86_64-unknown-linux-gnu.tar.gz kubectl-view-allocations: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by kubectl-view-allocations)

Thanks you!

salmon5 avatar May 22 '21 13:05 salmon5

CentOS7/RHEL7 is not supported.

salmon5 avatar May 23 '21 13:05 salmon5

Thanks for reporting, I'll publish a new version soon and I'll migrate from glibc to musl so this issue should gone (I hope following test I made 2 yo with musl on centos).

davidB avatar May 23 '21 14:05 davidB

Sorry I'll not be able to produce for the next release

  • a musl binary: some of transitive dependencies require libc and failed to build when build target musl
  • a binary for old glibc, like on CentOS 5/7: need to change the build CI (maybe without success from some ticket I read), but maybe in the coming weeks

You can try to build it yourself on your CentOS:

# install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable

# build
git clone https://github.com/davidB/kubectl-view-allocations.git
cd kubectl-view-allocations.git
cargo build --release

# install
cp target/release/kubectl-view-allocations ...

davidB avatar May 23 '21 17:05 davidB

hello, I build the 0.13.0 branch on CentOS7,it works well! many thanks! git clone -b 0.13.0 https://github.com/davidB/kubectl-view-allocations.git

The master branch or 0.14 branch seems has some display issue:output raw json data. git clone https://github.com/davidB/kubectl-view-allocations.git git clone -b 0.14.0 https://github.com/davidB/kubectl-view-allocations.git

salmon5 avatar May 24 '21 03:05 salmon5

Else thanks for the feedback, now I know that it can be build with old glibc, CentOS 7.

in 0.14 the json are the log (by default "warning level",

-you can change it with RUST_LOG=error kubectl-view-allocations ... (I'll provide verbose flag in a coming release)

  • you can redirect log into a file or /dev/null kubectl-view-allocations .... 2>/dev/null

But if you have log, it's maybe because you have an issue like enabled -u but do not have metrics api accessible. Can you share the full log ?

davidB avatar May 24 '21 07:05 davidB

[root@ocbasqa01 view-allocation]# kubectl-view-allocations --help kubectl-view-allocations: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by kubectl-view-allocations) [root@ocbasqa01 view-allocation]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.7 (Maipo) [root@ocbasqa01 view-allocation]#

upszot avatar Jul 27 '22 21:07 upszot

I also got this error, resolved as follows:

1. Check GLIBC version:
strings /usr/lib64/libc.so.6 | grep GLIBC_2.1
...
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
=> No GLIBC_2.18

2. Install GLIBC_2.18:
wget http://mirrors.ustc.edu.cn/gnu/libc/glibc-2.18.tar.gz
tar -zxvf glibc-2.18.tar.gz

cd glibc-2.18
mkdir build
cd build
../configure --prefix=/usr
make -j4
sudo make install

3. Check again:
strings /usr/lib64/libc.so.6 | grep GLIBC_2.1
...
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_2.18

That is it :)

astraw99 avatar Sep 04 '22 15:09 astraw99

Hi @davidB, would you consider building a static binary?

I think this could solve a range of issues people are reporting here. Your thoughts?

That said, I am not sure how much effort that would be, given some of the dependencies, etc.

kwilczynski avatar Sep 06 '22 19:09 kwilczynski

a version build with musl (static) is provided since the latest version 0.16.3

davidB avatar Apr 08 '23 19:04 davidB