go get tools - KerwinKoo/KerwinKoo.github.io GitHub Wiki
```
title: GoGetTools 问题解决
date: 2015-12-23 12:20:37
tags: [Go]
filename: go_get_tools
categories: Go
```
在编译HUGO时遇到的问题。
报错信息:
hugolib/site.go:33:2: cannot find package "bitbucket.org/pkg/inflect" in any of:{GOPATH}
意思是当前的工程缺少import包文件。但我是通过go get直接在github中获取到本地的,原则上不会缺少包丢失的情况,因此问题定位在go get过程包获取不完整。
重新go get发现报错信息:
go: missing Mercurial command. See https://golang.org/s/gogetcmd
package bitbucket.org/pkg/inflect: exec: "hg": executable file not found in $PATH
说的很明白,无法执行命令hg,是因为缺少Mercurial command。
解决方案,安装Mercurial:
sudo apt-get install mercurial
另外go get提示中也提到了获取missing command的介绍:https://golang.org/s/gogetcmd,里面有对于go get过程中需要的命令如何下载进行了汇总,遇到类似的其他问题可以在里面找到解决方案。