httpie / cli

🥧 HTTPie CLI — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more.
https://httpie.io
BSD 3-Clause "New" or "Revised" License
32.74k stars 3.68k forks source link

version 3.2.1 is not real single-binary #1423

Open wgqimut opened 1 year ago

wgqimut commented 1 year ago

Checklist


Minimal reproduction code and steps

  1. download httpie 3.2.1 (latest httpie version) to centos7 machine
  2. run "./http"

Current result

Error loading Python lib '/tmp/_MEITUP865/libpython3.9.so.1.0': dlopen: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by /tmp/_MEITUP865/libpython3.9.so.1.0)

Expected result

usage:
    http [METHOD] URL [REQUEST_ITEM ...]

error:
    the following arguments are required: URL

for more information:
    run 'http --help' or visit https://httpie.io/docs/cli

it seems that httpie still rely on libpython3.9.so, and libpython3.9.so rely on specific glibc version.

lucasfcnunes commented 1 year ago

It's not just httpie 3.2.1.

Tried other versions on docker's busybox:1.35.0 (uclibc, "has no python") and the same happened:

docker run --rm -it busybox:1.35.0
cd /tmp
rm *
touch 3.1.0  3.2.0  3.2.1
find * -type f -print -exec wget -O http-{} https://github.com/httpie/httpie/releases/download/{}/http \;
chmod +x http-*
find . -name "http*" -print -exec sh -c "{} --version" \;
# ./http-3.2.0
# sh: ./http-3.2.0: not found
# ./http-3.2.1
# sh: ./http-3.2.1: not found
# ./http-3.1.0
# sh: ./http-3.1.0: not found

It was never statically linked. ~Would building it with something like CGO_ENABLED=0 go build -static solve it? Doing it may bloat the final binary, right?~

-- EDIT -- Just noticed it's not a go project 😅