开发者

Trying Google's 'Go' for Linux, and I could use some help

I'm new to Linux, so I'm trying Ubuntu; I've installed Google's Go, thought I might give it a try.

Though every-time I 开发者_运维知识库try to compile I get:

8g: Command not found

I'm confused.. Any help?


This part of the installation process is partially discussed here.

You need to add what corresponds to your $GOBIN directory to your $PATH. Add the following line (adjusted for your system) to your ~/.bashrc:

PATH="$HOME/src/golang/bin:$PATH"

Keep in mind that while Go is heavily Unix-inspired, it's not representative of the "typical" Linux experience, which at present is a mix of Python and C.


Glancing through the guide you linked to, it doesn't appear to install 8g etc. to /usr/bin but rather to a directory in your home directory. Is the directory containing 8g in your path?

(If you're not sure how to test this, type echo $PATH in your terminal to get the current path list. If 8g wasn't in your path then try export PATH=$PATH:/my/new/bit and then try again. To make such a change permanent, you'll need to edit your ~/.bashrc)


There are ubuntu packages for golang provided by Gustavo Niemeyer. Instructions for installing these packages are here.


If you are on amd64 machine then the compiler is 6g (and the linker is 6l). You can find the type of the machine by running uname -m

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜