-1

My script is quite basic and works on Debian:

apt update && apt install wget -y
cd /root
wget https://aka.ms/dotnet-counters/linux-x64 -O dotnet-counters
chmod a+x dotnet-counters
./dotnet-counters collect -p 1

now, replacing the apt for its equivalent apk, lines 1 to 4 run without any hiccups but line 5 says sh: ./dotnet-counters: not found... if I run a ls -l command I see

total 14332
-rwxr-xr-x    1 root     root      14675612 Jun  8 23:08 dotnet-counters

with dotnet-counters in green font (don't know if that means anything)

Can anyone tell me what am I doing wrong?

Edit 1:
file dotnet-counters says not found, also here's a screenshot, perhaps im missing something:
enter image description here

Leonardo
  • 10,737
  • 10
  • 62
  • 155
  • What does `file dotnet-counters`say? – kometen Aug 10 '23 at 11:31
  • it says `not found`... I added a screenshot also, check Edit1 – Leonardo Aug 10 '23 at 12:36
  • Looks like it can't find the `file` utility. Maybe Alpine Linux have the absolute minimum of support for basic operations and you need to install a package that contains the `file` utility. – kometen Aug 10 '23 at 12:47
  • Please do not post screenshots. – KamilCuk Aug 10 '23 at 15:59
  • 1
    Does this answer your question? [Docker Alpine executable binary not found even if in PATH](https://stackoverflow.com/questions/66963068/docker-alpine-executable-binary-not-found-even-if-in-path) – KamilCuk Aug 10 '23 at 16:01

1 Answers1

0

Normally, you are correctly running the executable.

You are not able to run any executable on alpine linux, just like on any system. You have to have executable compatible with alpine.

KamilCuk
  • 120,984
  • 8
  • 59
  • 111