cli icon indicating copy to clipboard operation
cli copied to clipboard

alpine fails with deepsource: cannot execute: required file not found

Open jayvdb opened this issue 1 year ago • 3 comments

Running deepsource from https://github.com/DeepSourceCorp/cli/releases/download/v0.8.6/deepsource_0.8.6_linux_amd64.tar.gz on alpine:latest fails with

/usr/local/bin/deepsource: cannot execute: required file not found

https://github.com/taiki-e/install-action/actions/runs/9432055259/job/25981364422?pr=522

This isnt happening for any other platform tests in CI at https://github.com/taiki-e/install-action/pull/522

jayvdb avatar Jun 08 '24 23:06 jayvdb

I also repeatedly get this issue on Alpine 3.22

/opt/atlassian/pipelines/agent/tmp/shellScript1769309726629188254.sh: line 8: ./deepsource: not found

I have tried manually downloading and extracting the archive and also passing it to sh as documented. I am running this in Bitbuckets Pipelines, and this article implies that the binary may not be compatible: https://community.atlassian.com/forums/Bitbucket-questions/Updating-PATH-while-running-a-bitbucket-pipeline/qaq-p/1970097

rlaunch avatar Aug 13 '25 10:08 rlaunch

Hello,

Just to confirm, building the binary within the CI pipeline works as expected, so it does appear to be a compatibility issue with Alpine. Here's a rough script I'm using in our Bitbucket Pipelines in-case it helps anyone:

#!/usr/bin/env sh
apk add go make wget
mkdir deepsource-build && cd deepsource-build || exit 1
OUTPUT_DIR=`pwd`
wget https://github.com/DeepSourceCorp/cli/archive/refs/tags/v0.10.1.tar.gz
tar -xvf v0.10.1.tar.gz
cd cli-0.10.1/ || exit 1
cd cmd/deepsource && go build -tags static_all -o "$OUTPUT_DIR"

rlaunch avatar Aug 19 '25 08:08 rlaunch

Very likely the binary is linked to glibc , and that lib is not installed on the base alpine image

jayvdb avatar Aug 29 '25 00:08 jayvdb