我刚开始接触歌朗,我正尝试用本教程。编写一个程序
但是,我在编译时会抛出这个错误。
6g: command not found以下是我尝试过的:
$ go version
go version go1.4.1 darwin/amd64下面是我的.bashrc的样子:
$ tail ~/.bashrc
export GOBIN=/Users/abhijeet/code/golang/go/bin
export GOROOT=/Users/abhijeet/code/golang/go
export GOPATH=/Users/abhijeet/code/golang/gopath
export GOOS="darwin"
export GOARCH="amd64"
export PATH="$GOBIN:$PATH"以下是它的外观:
[ -r $HOME/.bashrc ] && source $HOME/.bashrc下面是我运行"gcc版本“命令时得到的信息:
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix他们要求的是:
6g -I $GOPATH/pkg/linux_amd64 urlshortener.go我所要做的是:
6g -I $GOPATH/pkg/darwin_amd64 urlshortener.go我能找到的就是
darwin_amd64
├───code.google.com
│ ├───p
│ │ └───google-api-go-client
│ │ └───googleapi
│ │ │ └─── <more folders and files here>
│ │ └───urlshortener
│ │ │ └───v1.a
│ │ └───googleapi.a
│ │ 所以我知道这里有一些问题,但我也知道这可能不是导致我看到的错误的原因,否则我会看到像“文件找不到”这样的错误。我只想把它作为额外的数据。
所以我很感谢你在这方面的帮助。请让我知道,如果我应该提供任何额外的数据以及。
https://stackoverflow.com/questions/28608216
复制相似问题