New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
az bicep install incorrectly downloads musl binary #5040
Comments
Hi @benc-uk, do you happen to have the musl package |
Yes I do have that file on my system |
That explains it. I cannot think of a more robust way to detect Linux OS type, but on thing we can do is to add a parameter to the install command to let users specify which Bicep executable they want to install. |
@benc-uk -- would this cover it for you? is it ok if we would still install the "wrong" version by default for this case? Exit criteria for resolving this issue needs to include documenting this case. |
Thanks for taking a look at this. |
I've just hit this, and while the solution does work it's really hard to find. Would it be possible to improve the error message rather than just dumping a bunch of relocation errors? @shenglol Would it be feasible for the cli to check what binary type it is, and then download whatever that is? I guess you'd end up looking at what python you have installed. |
Installing the bicep command on systems using glibc that also have MUSL installed generate errors at runtime (See Azure/bicep#5040) This expands the MUSL detection logic to exclude systems with glibc, which is the primary non-musl libc.
Bicep version
Bicep CLI version 0.4.1008 (223b8d2)
Describe the bug
After installing Bicep addon to the Azure CLI, and running any az bicep command (or deploying a bicep template) results in the following error
When I run bicep from the version I download from GitHub, it functions perfectly
When I examine the binary I notice the version downloaded by az is for
/lib/ld-musl-x86_64.so.1
❯ file ~/.azure/bin/bicep /home/ben/.azure/bin/bicep: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, BuildID[sha1]=7a77090f49016d9e7520e235b4d7832bb37e49f5, stripped
The version I download directly from GitHub is for
/lib64/ld-linux-x86-64.so.2
To Reproduce
rm ~/.azure/bin/bicep
az bicep install
az bicep version
Additional context
I am running Ubuntu 20.04.2 LTS under WSL2 (Windows 11 version 10.0.22000 Build 22000)
The text was updated successfully, but these errors were encountered: