dqf42223 2011-12-20 16:03
浏览 153
已采纳

无法运行goinstall

goinstall go-tour.googlecode.com/hg/gotour

Running the above command give me the following message ..

goinstall: encoding/json: go/build: package could not be found locally
goinstall: code.google.com/p/go-tour/pic: cannot download: code.google.com/p/go-tour/pic
goinstall: code.google.com/p/go-tour/tree: cannot download: code.google.com/p/go-tour/tree
goinstall: code.google.com/p/go-tour/wc: cannot download: code.google.com/p/go-tour/wc
goinstall: os/exec: go/build: package could not be found locally
goinstall: net/http: go/build: package could not be found locally

I know that there is problem with path setting .. i also checked this post

export PATH=$PATH:/home/sakthi/sakthig/code/my/go/go/bin
export GOROOT=/home/sakthi/sakthig/code/my/go/go
export GOPATH=$GOROOT/bin

This is my current path setting.. any help ?

  • 写回答

3条回答 默认 最新

  • dounuo8797 2011-12-20 21:31
    关注

    The Go Tour project has been updated recently.

    The Go weekly.2011-11-09 release renamed the json package to encoding/json.

    The Go weekly.2011-12-14 release changed the naming for the go-tour package import paths from "go-tour.googlecode.com/hg/tree" to "code.google.com/p/go-tour/tree".

    Update to the Go weekly release (Keeping up with releases).

    $ cd $GOROOT/src
    $ hg pull
    $ hg update weekly
    $ ./all.bash
    

    Then install the go-tour/tree package.

    $ cd $GOROOT
    $ goinstall -v -fix code.google.com/p/go-tour/tree
    goinstall: open /home/peter/go/goinstall.log: no such file or directory
    goinstall: code.google.com/p/go-tour/tree: download
    goinstall: cd / && /usr/bin/hg clone https://code.google.com/p/go-tour /home/peter/go/src/pkg/code.google.com/p/go-tour
    goinstall: selecting tip
    goinstall: cd /home/peter/go/src/pkg/code.google.com/p/go-tour && /usr/bin/hg update
    goinstall: code.google.com/p/go-tour/tree: install
    goinstall: cd /home/peter/go/src/pkg/code.google.com/p/go-tour/tree && /bin/bash gomake -f- install
    $ 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 ogg dd trandata 报错
  • ¥15 高缺失率数据如何选择填充方式
  • ¥50 potsgresql15备份问题
  • ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
  • ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
  • ¥60 pb数据库修改与连接
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错