davidchalifoux / kaput-cli

The unofficial CLI client for Put.io - Kaput lets you manage your Put.io account from the comfort of your terminal!
https://kaput.sh/
MIT License
68 stars 7 forks source link

Installing on machine with older glibc #53

Closed crcastle closed 4 months ago

crcastle commented 4 months ago

My machine has glibc v2.31 (Debian Bullseye), which was too old for the kaput version v2.2.1 release file kaput-x86_64-unknown-linux-gnu.tar.gz. I got the following error when trying to run that v2.2.1 binary:

./kaput: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./kaput)
./kaput: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./kaput)
./kaput: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./kaput)

Considering I'm not a Rust dev so don't have nor want to install cargo and rustc, the easiest way for me to get a working binary was to create a statically linked binary using the following steps.

Happy to make a PR to the README with these installation instructions if you'd like.

git clone https://github.com/davidchalifoux/kaput-cli.git
docker pull rust
cd kaput-cli
docker run --rm -it -v "$PWD":/usr/src/myapp rust /bin/bash
cd /usr/src/myapp
RUSTFLAGS="-C target-feature=+crt-static" cargo build --target x86_64-unknown-linux-gnu
exit
./target/x86_64-unknown-linux-gnu/debug/kaput login

The current rust docker image contains glibc v2.36, but compiling kaput statically gets around that version not matching the v2.31 glibc on my Debian Bullseye host OS.

davidchalifoux commented 4 months ago

Thanks for calling this out.

I'll work on including a statically linked version of the build in the releases. IMO that'll be the best experience for people.

crcastle commented 4 months ago

Thanks for calling this out.

I'll work on including a statically linked version of the build in the releases. IMO that'll be the best experience for people.

Great. Thanks! And thanks for creating this handly CLI!

davidchalifoux commented 4 months ago

Try one of the builds ending in "musl" and let me know how it goes: https://github.com/davidchalifoux/kaput-cli/releases/tag/v2.2.2

crcastle commented 4 months ago

Worked on my Debian Bullseye (x86 64) with glibc 2.31.

On Tue, Apr 30, 2024, at 8:49 PM, David Chalifoux wrote:

Try one of the builds ending in "musl" and let me know how it goes: https://github.com/davidchalifoux/kaput-cli/releases/tag/v2.2.2

— Reply to this email directly, view it on GitHub https://github.com/davidchalifoux/kaput-cli/issues/53#issuecomment-2087935385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDKFXRUC3HUT4AKWXAE23ZABQ6LAVCNFSM6AAAAABG3PPGVOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBXHEZTKMZYGU. You are receiving this because you authored the thread.Message ID: @.***>

davidchalifoux commented 4 months ago

Thanks for confirming! Let me know if you run into any other issues.