我正在使用 Linux 64 位,我正在尝试设置 Go 进行交叉编译(特别是对于 Windows)。有这一个真棒指南这里。但是当我尝试运行下面的第二个命令时:
cd /usr/lib/go/src
sudo GOOS=windows GOARCH=386 CGO_ENABLED=0 ./make.bash --no-clean
尝试构建cmd包时出现错误。它说use of internal package not allowed。这是 Go 的主要源代码中的错误吗?我将粘贴完整的错误列表。
# Building packages and commands for host, linux/amd64.
package cmd/cmd/pprof
imports cmd/pprof/internal/driver: use of internal package not allowed
package cmd/cmd/pprof
imports cmd/pprof/internal/fetch: use of internal package not allowed
package cmd/cmd/pprof
imports cmd/pprof/internal/symbolizer: use of internal package not allowed
package cmd/cmd/pprof
imports cmd/pprof/internal/symbolz: use of internal package not allowed
package cmd/cmd/pprof/internal/commands
imports cmd/pprof/internal/report: use of internal package not allowed
package cmd/cmd/pprof/internal/commands
imports cmd/pprof/internal/svg: use of internal package not allowed
package cmd/cmd/pprof/internal/commands
imports cmd/pprof/internal/tempfile: use of internal package not allowed
package cmd/cmd/pprof/internal/driver
imports cmd/pprof/internal/commands: use of internal package not allowed
package cmd/cmd/pprof/internal/driver
imports cmd/pprof/internal/report: use of internal package not allowed
package cmd/cmd/pprof/internal/driver
imports cmd/pprof/internal/tempfile: use of internal package not allowed
package cmd/cmd/pprof/internal/fetch
imports cmd/pprof/internal/plugin: use of internal package not allowed
package cmd/cmd/pprof/internal/fetch
imports cmd/pprof/internal/profile: use of internal package not allowed
package cmd/cmd/pprof/internal/plugin
imports cmd/pprof/internal/profile: use of internal package not allowed
package cmd/cmd/pprof/internal/report
imports cmd/pprof/internal/plugin: use of internal package not allowed
我在谷歌上找不到这样的东西,所以这可能意味着我做错了什么。顺便说一下,我正在使用 Arch Linux,并且我安装的Go是pacman,而不是从源代码。
温温酱
相关分类