无法在Debian上获取Go语言存储库。

huangapple go评论81阅读模式
英文:

can't fetch the go language repository on Debian

问题

我按照http://golang.org/doc/install.html上的安装指南进行安装,一开始一切顺利,但在“获取存储库”步骤时出现问题。

指南上说“$ hg clone -u release https://go.googlecode.com/hg/ go”,我按照命令执行,但系统总是提示错误,所以我阅读了帮助文档,并将其修改为“$ hg clone -U release ..repo url... go”(我没有看到小写的u选项,但有一个大写的U选项,意思是不更新),但仍然出错,所以我再次修改为“$ hg clone -U r60 ..repo url... go”(我认为release实际上是指go的发布版本号?),好了,现在终于可以了,但是,当一切结束时,切换到go目录时,嘿,为什么所有的文件都是隐藏的?与url目录不同,例如没有src目录。

那么我做错了什么?对不起,我的英语不好,谢谢你的帮助。

在指南页面上,他们说我需要安装python-setuptools python-dev和build-essential,因为在Ubuntu/Debian用户的发行版软件包存储库中,将“很可能是旧的和损坏的”,这是什么意思?我应该手动安装工具(但不是easy_install)吗?

我认为jnml指出了最匹配的答案。

我以为这个问题已经解决了,问题是Ubuntu/Debian的存储库中的版本太旧了,如果你只是easy_install(apt-get install),你得到的版本是1.0.1,这与go安装指南中给出的命令不匹配,所以一个简单的解决方法是(感谢jnml指出这一点):

  1. hg clone
  2. cd go
  3. hg update release

就这样解决了。

但我仍然想知道如何在我的Debian上安装最新版本的go,但这是另一个问题,非常感谢所有回答我的人,谢谢你们的帮助!

英文:

I follow the installation guide at http://golang.org/doc/install.html,
at first everything goes well, but problem comes at the "fetch the repository" step,

the guide says "$ hg clone -u release https://go.googlecode.com/hg/ go"
I follow the command but system always say that's wrong
so I read the help and modified it into
"$ hg clone -U release ..repo url... go"
(I don't see a lowercase u option but there's a U instead which means noupdate)
but still goes wrong
so I modified it again
"$ hg clone -U r60 ..repo url... go"
(I think release actually means go release number?)
ok, now that works finally
but, when it's over
cd to the go directory,hey,why all the files are hidden?!
and different with the url directory, for ex there's no such a src directory

so what am I doing wrong, and sorry for my english is not good
thank you for your help


for as a new user I can't attach a image and can't have more than two links in one post, see the picture link below at the reply to Evan Shaw

and in the guide page they say that I need to install python-setuptools python-dev and build-essential, because in ubuntu/debian users' distribution's package repository, the will "most likely be old and broken", what that mean? Am I suppose to install the tool manually(but not a easy_install)?


for a new user I can't answer myself,I think jnml points out the best matched answer

I thought this question is answerd,
the problem is that repository in Ubuntu/Debian for is tool old,
if you just easy_install (apt-get install )
you got version 1.0.1 , that's not match for the command gave on the go installation guide,
so a simple way to work it out is(thanks jnml for pointing this out):

  1. hg clone
  2. cd go
  3. hg update release

that's done.

but I still wonder how can I get the latest version of be installed on my Debian,but that's another question,
Thanks a lot to all of you who reply to me, thank you for your help!

答案1

得分: 1

hg -u(小写)绝对是正确的,请检查您的Mercurial版本。

$ hg help clone
...
选项:

 -U --noupdate           克隆将包含一个空的工作副本(仅包含一个仓库)
 -u --updaterev REV      要检出的修订版本、标签或分支
...
$
英文:

hg -u (lower case) is definitely correct, check your version of mercurial.

$ hg help clone
...
options:

 -U --noupdate           the clone will include an empty working copy (only a repository)
 -u --updaterev REV      revision, tag or branch to check out
...
$ 

huangapple
  • 本文由 发表于 2012年1月15日 14:58:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/8868077.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定