gpt4 book ai didi

go - 无法在 Fedora 31 中安装 gopls

转载 作者:行者123 更新时间:2023-12-01 22:22:40 25 4
gpt4 key购买 nike

我有以下版本

$ go version
go version go1.14.3 linux/amd64

$ which
/usr/local/go/bin/go

GOPATH 设置为
    $ echo $GOPATH
/home/raj/go

PATH 变量设置为 -
$ echo $PATH
/home/raj/.cargo/bin:/home/raj/go/bin:/home/raj/.cabal/bin:/home/raj/.ghcup/bin:/home/raj/.cargo/bin:/home/raj/.cabal/bin:/home/raj/.ghcup/bin:/home/raj/.cabal/bin:/home/raj/.ghcup/bin:/home/raj/.cargo/bin:/home/raj/.cabal/bin:/home/raj/.ghcup/bin:/home/raj/.cargo/bin:/home/raj/.cabal/bin:/home/raj/.ghcup/bin:/home/raj/.sdkman/candidates/maven/current/bin:/home/raj/.sdkman/candidates/java/current/bin:/home/raj/.sdkman/candidates/gradle/current/bin:/home/raj/.cargo/bin:/home/raj/.cabal/bin:/home/raj/.ghcup/bin:/home/raj/.local/bin:/home/raj/bin:/home/raj/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/var/lib/snapd/snap/bin:/usr/local/go/bin:/home/raj/bin:/home/raj/Deps/cmake/3.16.5/cmake/bin/:/usr/local/go/bin:/home/raj/bin:/home/raj/Deps/cmake/3.16.5/cmake/bin/:/usr/local/go/bin:/home/raj/bin:/home/raj/Deps/cmake/3.16.5/cmake/bin/

如您所见 /home/raj/go/bin在路径中

现在,我正在尝试安装 gopls我得到了低于错误 -

$ GO111MODULE=on go get -v golang.org/x/tools/gopls@latest go: golang.org/x/tools/gopls latest => v0.4.1 runtime/internal/atomic

runtime/internal/atomic

/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:13:6: Load redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:16:24 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:19:6: Loadp redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:22:32 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:25:6: Load64 redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:28:26 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:31:6: LoadAcq redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:34:27 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:36:6: Xadd redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:39:37 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:39:6: Xadd64 redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:42:39 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:42:6: Xadduintptr redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:45:47 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:45:6: Xchg redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:48:36 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:48:6: Xchg64 redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:51:38 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:51:6: Xchguintptr redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:54:45 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:51:6: too many errors



为什么我收到这个错误,我该如何解决这个问题?

注意:我的操作系统详细信息是 -
    $ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 31 (Thirty One)
Release: 31
Codename: ThirtyOne

最佳答案

正如@Jimb 评论的那样,我删除了 go 安装 sudo rm -rf /usr/local/go并重新安装,它工作正常。

关于go - 无法在 Fedora 31 中安装 gopls,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62031629/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com