当前位置: 首页 > 面试题库 >

进行项目构建失败:在此块中重新声明了lfstackPack

乐正秦斩
2023-03-14
问题内容

我是Go语言的新手,在构建项目时,它返回以下错误:

/usr/local/go/bin/go run /home/qiuwei/GoWorkSpace/src/LearnGo/SoHi/Hello.go
# runtime
/usr/local/go/src/runtime/lfstack_amd64.go:16: lfstackPack redeclared in this block
    previous declaration at /usr/local/go/src/runtime/lfstack_64bit.go:37
/usr/local/go/src/runtime/lfstack_amd64.go:20: lfstackUnpack redeclared in this block
    previous declaration at /usr/local/go/src/runtime/lfstack_64bit.go:41
/usr/local/go/src/runtime/os_linux_generic.go:13: _SS_DISABLE redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os2_linux_generic.go:12
/usr/local/go/src/runtime/os_linux_generic.go:14: _NSIG redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os2_linux_generic.go:13
/usr/local/go/src/runtime/os_linux_generic.go:15: _SI_USER redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os2_linux_generic.go:14
/usr/local/go/src/runtime/os_linux_generic.go:16: _SIG_BLOCK redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os2_linux_generic.go:15
/usr/local/go/src/runtime/os_linux_generic.go:17: _SIG_UNBLOCK redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os2_linux_generic.go:16
/usr/local/go/src/runtime/os_linux_generic.go:18: _SIG_SETMASK redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os2_linux_generic.go:17
/usr/local/go/src/runtime/os_linux_generic.go:19: _RLIMIT_AS redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os2_linux_generic.go:18
/usr/local/go/src/runtime/os_linux_generic.go:25: sigset redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os2_linux_generic.go:24
/usr/local/go/src/runtime/os_linux_generic.go:25: too many errors

显示我的环境:

export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/GoWorkSpace

转到版本:go1.6.3。作业系统:Ubuntu 14.04

如何解决?


问题答案:

删除所有提取的文件,然后再次提取1.6 tar。如果仍然遇到问题,也可以尝试重新启动终端。

sudo rm -rf /usr/local/go
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz

有关更多详细信息,请参见此



 类似资料:
  • 问题内容: 我试图构建新项目,但是当我单击构建时,构建每次都会失败。 我尝试删除我的项目并再次创建它,但是仍然没有帮助。 警告 错误 这些是Xcode向我显示的错误消息。项目名称为“ MyFirstApp”,我在该错误消息上剪切了一些文件路径。那么我如何建立这个项目呢? 问题答案: 在终端中尝试:

  • 项目将不生成:错误:包java.util.logging不存在[javac]导入Java . util . logging . level; 重现步骤:(日食霓虹灯) 1.创建一个新的代号项目。2.打开代号一设置,下载admob扩展3。刷新 cn1libraries. 获取以下错误。请注意,原生android没有java util。为什么它使用javase?

  • 分级任务 null 在https://help.gradle.org获得更多帮助

  • 我将Android Studio升级到北极狐2020.3.1补丁3,但在我构建该项目时,Flitter项目失败了。它以前工作得很好。 以下是错误日志: 这是我的环境: 请告诉我如何解决这个问题?

  • 创建新的Gradle项目失败,org.Gradle.tooling.BuildException:无法使用Gradle发行版“https://services.Gradle.org/distributions/gradle-6.3-bin.zip”执行生成。 如果我单击finish,那么我会看到问题--无法使用Gradle发行版'https://services.Gradle.org/distri

  • 操作步骤: 菜单栏:Build --> Rebuild Project(重新构建项目)