您尚未登录。

#1 2024-05-31 22:14:02

dxcqcv
会员
注册时间: 2012-12-28
帖子: 242

如何安装yay

克隆完YAY项目后执行makepkg -si报错,无法 download GO,求助

我有梯子,然后用privoxy全局代理http_proxy和https_proxy也没用

用wiki中的makepkg代理也没用

/etc/pacman.conf
...
XferCommand = /usr/bin/curl --proxy http://username:password@proxy.proxyhost.com:80 --location --continue-at - --fail --output %o %u
...

报错信息如下

➜ makepkg -si
==> Making package: yay 12.3.5-1 (Fri 31 May 2024 10:01:52 PM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found yay-12.3.5.tar.gz
==> Validating source files with sha256sums...
    yay-12.3.5.tar.gz ... Passed
==> Extracting sources...
  -> Extracting yay-12.3.5.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
go build -trimpath -mod=readonly -modcacherw -ldflags '-X "main.yayVersion=12.3.5" -X "main.localePath=/usr/share/locale/" -linkmode=external -compressdwarf=false' -buildmode=pie -o yay
go: downloading github.com/Jguer/aur v1.2.3
go: downloading github.com/Jguer/go-alpm/v2 v2.2.2
go: downloading github.com/Jguer/votar v1.0.0
go: downloading github.com/Morganamilo/go-srcinfo v1.0.0
go: downloading github.com/deckarep/golang-set/v2 v2.6.0
go: downloading github.com/leonelquinteros/gotext v1.5.2
go: downloading golang.org/x/sys v0.18.0
go: downloading github.com/Morganamilo/go-pacmanconf v0.0.0-20210502114700-cff030e927a5
go: downloading github.com/adrg/strutil v0.3.1
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading golang.org/x/term v0.18.0
clean.go:8:2: github.com/Jguer/aur@v1.2.3: Get "https://proxy.golang.org/github.com/%21jguer/aur/@v/v1.2.3.zip": dial tcp 142.251.42.241:443: i/o timeout
cmd.go:11:2: github.com/Jguer/go-alpm/v2@v2.2.2: Get "https://proxy.golang.org/github.com/%21jguer/go-alpm/v2/@v/v2.2.2.zip": dial tcp 142.251.42.241:443: i/o timeout
vote.go:8:2: github.com/Jguer/votar@v1.0.0: Get "https://proxy.golang.org/github.com/%21jguer/votar/@v/v1.0.0.zip": dial tcp 142.251.42.241:443: i/o timeout
pkg/text/errors.go:3:8: github.com/leonelquinteros/gotext@v1.5.2: Get "https://proxy.golang.org/github.com/leonelquinteros/gotext/@v/v1.5.2.zip": dial tcp 142.251.42.241:443: i/o timeout
pkg/db/ialpm/alpm.go:11:2: github.com/Morganamilo/go-pacmanconf@v0.0.0-20210502114700-cff030e927a5: Get "https://proxy.golang.org/github.com/%21morganamilo/go-pacmanconf/@v/v0.0.0-20210502114700-cff030e927a5.zip": dial tcp 142.251.42.241:443: i/o timeout
pkg/intrange/intrange.go:8:2: github.com/deckarep/golang-set/v2@v2.6.0: Get "https://proxy.golang.org/github.com/deckarep/golang-set/v2/@v/v2.6.0.zip": dial tcp 142.251.42.241:443: i/o timeout
pkg/query/metric.go:7:2: github.com/adrg/strutil@v0.3.1: Get "https://proxy.golang.org/github.com/adrg/strutil/@v/v0.3.1.zip": dial tcp 142.251.42.241:443: i/o timeout
pkg/query/query_builder.go:13:2: github.com/adrg/strutil@v0.3.1: Get "https://proxy.golang.org/github.com/adrg/strutil/@v/v0.3.1.zip": dial tcp 142.251.42.241:443: i/o timeout
pkg/query/source.go:7:2: github.com/hashicorp/go-multierror@v1.1.1: Get "https://proxy.golang.org/github.com/hashicorp/go-multierror/@v/v1.1.1.zip": dial tcp 142.251.42.241:443: i/o timeout
pkg/dep/dep_graph.go:10:2: github.com/Morganamilo/go-srcinfo@v1.0.0: Get "https://proxy.golang.org/github.com/%21morganamilo/go-srcinfo/@v/v1.0.0.zip": dial tcp 142.251.42.241:443: i/o timeout
pkg/runtime/runtime.go:20:2: github.com/Jguer/aur@v1.2.3: Get "https://proxy.golang.org/github.com/%21jguer/aur/@v/v1.2.3.zip": dial tcp 142.251.42.241:443: i/o timeout
pkg/runtime/runtime.go:21:2: github.com/Jguer/aur@v1.2.3: Get "https://proxy.golang.org/github.com/%21jguer/aur/@v/v1.2.3.zip": dial tcp 142.251.42.241:443: i/o timeout
pkg/runtime/pacman.go:10:2: golang.org/x/term@v0.18.0: Get "https://proxy.golang.org/golang.org/x/term/@v/v0.18.0.zip": dial tcp 142.251.42.241:443: i/o timeout
print.go:16:2: golang.org/x/sys@v0.18.0: Get "https://proxy.golang.org/golang.org/x/sys/@v/v0.18.0.zip": dial tcp 142.251.42.241:443: i/o timeout
make: *** [Makefile:114: yay] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

learning Arch linux

离线

#2 2024-06-01 09:29:42

ctr
会员
注册时间: 2024-02-18
帖子: 10

Re: 如何安装yay

建议用其他全局代理工具。

离线

#3 2024-06-01 15:52:10

OldFish
会员
注册时间: 2024-01-13
帖子: 19

Re: 如何安装yay

github有时候能连上去,在不同的时间点尝试,
至于透明代理的话我用的是v2rayA,你可以去看看他们的说明文档

最近编辑记录 OldFish (2024-06-01 15:53:24)

离线

#4 2024-06-01 18:08:28

nibazshab
会员
注册时间: 2022-02-04
帖子: 143

Re: 如何安装yay

vim 打开 PKGBUILD 文件,手动把所有的要下载的 golang 依赖全部替换位国内代理的地址。

例如你给出的报错中的

clean.go:8:2: github.com/Jguer/aur@v1.2.3: Get "https://proxy.golang.org/github.com/%21 … v1.2.3.zip": dial tcp 142.251.42.241:443: i/o timeout

在 PKGBUILD 中把 https://proxy.golang.org/github.com/%21 … v1.2.3.zip 替换为 https://goproxy.cn/github.com/%21jguer/ … v1.2.3.zip

离线

#5 2024-06-13 20:49:26

dxcqcv
会员
注册时间: 2012-12-28
帖子: 242

Re: 如何安装yay

nibazshab 说:

vim 打开 PKGBUILD 文件,手动把所有的要下载的 golang 依赖全部替换位国内代理的地址。

例如你给出的报错中的

clean.go:8:2: github.com/Jguer/aur@v1.2.3: Get "https://proxy.golang.org/github.com/%21 … v1.2.3.zip": dial tcp 142.251.42.241:443: i/o timeout

在 PKGBUILD 中把 https://proxy.golang.org/github.com/%21 … v1.2.3.zip 替换为 https://goproxy.cn/github.com/%21jguer/ … v1.2.3.zip

PKGBUILD里没有 https://proxy.golang.org/github.com/%21 … v1.2.3.zip

# Maintainer: Jguer <pkgbuilds at jguer.space>
pkgname=yay
pkgver=12.3.5
pkgrel=1
pkgdesc="Yet another yogurt. Pacman wrapper and AUR helper written in go."
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64' 'riscv64')
url="https://github.com/Jguer/yay"
options=(!lto)
license=('GPL-3.0-or-later')
depends=(
  'pacman>6.1'
  'git'
)
optdepends=(
  'sudo: privilege elevation'
  'doas: privilege elevation'
)
makedepends=('go>=1.21')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Jguer/yay/archive/v${pkgver}.tar.gz")
sha256sums=('2fb6121a6eb4c5e6afaf22212b2ed15022500a4bc34bb3dc0f9782c1d43c3962')

build() {
  export GOPATH="$srcdir"/gopath
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export CGO_ENABLED=1

  cd "$srcdir/$pkgname-$pkgver"
  make VERSION=$pkgver DESTDIR="$pkgdir" PREFIX="/usr" build
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make VERSION=$pkgver DESTDIR="$pkgdir" PREFIX="/usr" install
}

https://github.com/Jguer/yay

最近编辑记录 dxcqcv (2024-06-13 20:50:15)


learning Arch linux

离线

#6 2024-06-13 20:53:31

dxcqcv
会员
注册时间: 2012-12-28
帖子: 242

Re: 如何安装yay

OldFish 说:

github有时候能连上去,在不同的时间点尝试,
至于透明代理的话我用的是v2rayA,你可以去看看他们的说明文档

我用的梯子也是v2ray内接VMESS


learning Arch linux

离线

#7 2024-06-16 00:24:17

JHT213
会员
注册时间: 2024-05-25
帖子: 3

Re: 如何安装yay

可以添加archlinuxcn的源, 国内直连下载yay. (然后再把 archlinuxcn 删除 (误)).

离线

#8 2024-06-29 09:57:37

giteeajake
会员
所在地: Hebei
注册时间: 2024-06-11
帖子: 31
个人网站

Re: 如何安装yay

i think Paru is good
About go repo
you can see this URL

https://learnku.com/go/wikis/38122

离线

页脚