Git Product home page Git Product logo

Comments (12)

ByAgenT avatar ByAgenT commented on May 18, 2024 1

@cmaclaughlin The binary is published in self-contained mode and has .NET runtime bundled in it. But it seems like for Linux environment it is still requiring some dependencies to be installed on the current dist. @lee0c can you please try install CoreCLR dependencies and see if it resolves the issue? I took this from this example

apt-get install -y  libunwind8 \
            libkrb5-3 \
            libicu55 \
            liblttng-ust0 \
            libssl1.0.0 \
            zlib1g \
            libuuid1 \
            liblldb-3.6

from sbom-tool.

bureado avatar bureado commented on May 18, 2024 1

Looks like something went wrong with the download and the saved file is plaintext instead of an x64 ELF.

from sbom-tool.

ByAgenT avatar ByAgenT commented on May 18, 2024 1

I still couldn't repro this error and so far couldn't confirm if the problem with the tool itself. Tried WSL Ubuntu w/ .NET installed, freshly installed Debian in WSL w/out .NET runtime and Ubuntu 20.04 in Docker w/out .NET runtime, all works fine. Is the error limited to only one specific installation of WSL or you can repro that from clean distro install? If it's only failing for specific installation, I may suggest to try clean install and see if that resolves the problem. If you can repro that on a fresh installation, please share exact steps how to setup environment where it's failing.

from sbom-tool.

lee0c avatar lee0c commented on May 18, 2024 1

@bureado reached out and gave me a few troubleshooting ideas. Running file /usr/local/bin/salus spit out /usr/local/bin/salus: ASCII text, with no line terminators as said above.

We found out that using wget got me a working binary - but this seemed really weird so I went looking further.

I found that I couldn't replicate the bad download today with curl, using either version 0.1.2 or 0.1.3, so I started looking through my shell history.

I did find a curl command that replicated the error - a case where copy-pasting curl -Lo salus https://github.com/microsoft/sbom-tool/releases/download/v${SALUS_VERSION}/sbom-tool-linux-x64 into my terminal tried to escape the curly brackets, resulting in curl -Lo salus https://github.com/microsoft/sbom-tool/releases/download/v$\{SALUS_VERSION\}/sbom-tool-linux-x64 - but this is later in the history than my first downloads and attempts to use it as far as I can either remember or see in the logs.

Regardless of my confusion, this should probably ultimately be chalked up to PEBCAK somehow on my part and so I will close it. The resulting file from that incorrect curl command would absolutely be a text file reading Not Found - something which would produce the error 1: Not: not found as I reported.

from sbom-tool.

ByAgenT avatar ByAgenT commented on May 18, 2024

What distro do you use with WSL? I am able to run the tool in Ubuntu and Debian distributions following your commands. It might be that some dependencies are missing in your distribution we are not aware of yet.

from sbom-tool.

lee0c avatar lee0c commented on May 18, 2024

@ByAgenT Ubuntu 20.04.4 LTS (GNU/Linux 4.19.128-microsoft-standard x86_64)

from sbom-tool.

lee0c avatar lee0c commented on May 18, 2024

If I start an Azure Cloud Shell session and download & run Salus there, salus -h displays reasonable help text with no errors 🎉So yes, the above reported error does seem to be something specific to my WSL distro

I've also run into some odd behaviour surrounding the command in CI pipelines, but I will detail that in another issue as it is likely sufficiently separate (now found in issue #56 ).

from sbom-tool.

cmaclaughlin avatar cmaclaughlin commented on May 18, 2024

@ByAgenT is there a hard dependency on the .Net runtime?

from sbom-tool.

aasim avatar aasim commented on May 18, 2024

@lee0c Did you make the file executable? Also, can you please run the file from the place it was downloaded first to check if the file runs correctly?

You can do chmod a+x salus to make the file executable.

from sbom-tool.

lee0c avatar lee0c commented on May 18, 2024

@aasim I included chmod +x in my writeup above, yes. I tried a few different variations of running it directly after downloading, moving it to a folder on my $PATH, etc - no change in result so I have no reason to believe the mv command is affecting the outcome.

I think @cmaclaughlin 's question is likely pointing to the source of it. Azure Cloud Shell has dotnet runtime by default, whereas it's not installed in my WSL distro.

from sbom-tool.

lee0c avatar lee0c commented on May 18, 2024

@ByAgenT I'm surprised I'm not getting an error such as in #43 if that's the case, but I'll give it a shot.

from sbom-tool.

lee0c avatar lee0c commented on May 18, 2024

@ByAgenT No change, unfortunately

from sbom-tool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.