英文:
go building error: lzma.h No such file or directory
问题
我正在构建payload-dumper-go,并且遇到了这个错误:
❯ go build
# github.com/spencercw/go-xz
/home/ecarroll/go/pkg/mod/github.com/spencercw/go-xz@v0.0.0-20181128201811-c82a2123b492/compression.go:36:10: 致命错误: lzma.h: 没有那个文件或目录
36 | #include <lzma.h>
| ^~~~~~~~
编译终止。
英文:
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/go-xz@v0.0.0-20181128201811-c82a2123b492/compression.go:36:10: fatal error: lzma.h: No such file or directory
36 | #include <lzma.h>
| ^~~~~~~~
compilation terminated.
答案1
得分: 1
这是一个更简单的“下次”方法。
github.com/ssut/payload-dumper-go
使用 Github Actions 进行构建和测试。
检查它的 .github/workflows/build.yml
文件:
...
步骤:
- 名称:安装依赖项
运行:
sudo apt -y update
sudo apt -y install git golang liblzma-dev
...
最后引用的一行包含所需的依赖项,即 git
、golang
和 liblzma-dev
。
英文:
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
.
答案2
得分: 0
我通过尝试Debian上的所有lzma
相关内容来解决这个问题。实际上需要安装的软件包是:
sudo apt install liblzma-dev
以下是无法正常工作的软件包:
lzma-dev
golang-github-kjk-lzma-dev
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论