我正在尝试安装supabase-git
,但许多其他软件包都发生了这种情况。在构建阶段,我得到了这个:
==> Starting build()...
missing $GOPATH
==> ERROR: A failure occurred in build().
Aborting...
Finished with result: exit-code
我已经运行export GOPATH=$HOME/go
(/home/pineapplefan/go)并且它包含/pkg
知道为什么会失败以及如何修复它吗?
(正在运行的命令是sudo pamac install supabase-git
)
答案1
尝试手动下载 PKGBUILD,并添加GOPATH=$HOME/go
到go build
换句话说,
build() {
cd cli
go build \
-gcflags "all=-trimpath=${PWD}" \
-asmflags "all=-trimpath=${PWD}" \
-ldflags "-extldflags ${LDFLAGS}" \
-o $_pkgname
}
变成
build() {
cd cli
GOPATH=$HOME/go go build \
-gcflags "all=-trimpath=${PWD}" \
-asmflags "all=-trimpath=${PWD}" \
-ldflags "-extldflags ${LDFLAGS}" \
-o $_pkgname
}
然后做makepkg -si