skip to Main Content

I’m building payload-dumper-go, and I get this error,

❯ go build
# github.com/spencercw/go-xz
/home/ecarroll/go/pkg/mod/github.com/spencercw/[email protected]/compression.go:36:10: fatal error: lzma.h: No such file or directory
   36 | #include <lzma.h>
      |          ^~~~~~~~
compilation terminated.

2

Answers


  1. Chosen as BEST ANSWER

    I solve this by brute force trying all lzma stuff that Debian had. The actually packaged needed was,

    sudo apt install liblzma-dev
    

    packages that didn't work,

    • lzma-dev
    • golang-github-kjk-lzma-dev

  2. Here’s an easier way for "next time".

    github.com/ssut/payload-dumper-go uses Github Actions for building and testing.

    Checking its .github/workflows/build.yml file:

    ...
    steps:
      - name: Install dependencies
        run: |
          sudo apt -y update
          sudo apt -y install git golang liblzma-dev
    ...
    

    The last quoted line contains the needed dependencies, namely git, golang and liblzma-dev.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search