golang程序编译时提示“package runtime: unrecognized import path "runtime" (import path does not begin with hostname)”
在编译golang的工程时提示错误的, 提示的错误信息如下:
package bytes: unrecognized import path "bytes" (import path does not begin with hostname)
package encoding/json: unrecognized import path "encoding/json" (import path does not begin with hostname)
package encoding/xml: unrecognized import path "encoding/xml" (import path does not begin with hostname)
package fmt: unrecognized import path "fmt" (import path does not begin with hostname)
package bufio: unrecognized import path "bufio" (import path does not begin with hostname)
package io: unrecognized import path "io" (import path does not begin with hostname)
package strings: unrecognized import path "strings" (import path does not begin with hostname)
package go/ast: unrecognized import path "go/ast" (import path does not begin with hostname)
package go/parser: unrecognized import path "go/parser" (import path does not begin with hostname)
package go/token: unrecognized import path "go/token" (import path does not begin with hostname)
package compress/gzip: unrecognized import path "compress/gzip" (import path does not begin with hostname)
package encoding/hex: unrecognized import path "encoding/hex" (import path does not begin with hostname)
package errors: unrecognized import path "errors" (import path does not begin with hostname)
package strconv: unrecognized import path "strconv" (import path does not begin with hostname)
package encoding: unrecognized import path "encoding" (import path does not begin with hostname)
package text/template: unrecognized import path "text/template" (import path does not begin with hostname)
package encoding/base64: unrecognized import path "encoding/base64" (import path does not begin with hostname)
package math: unrecognized import path "math" (import path does not begin with hostname)
package os: unrecognized import path "os" (import path does not begin with hostname)
package reflect: unrecognized import path "reflect" (import path does not begin with hostname)
package regexp: unrecognized import path "regexp" (import path does not begin with hostname)
package sort: unrecognized import path "sort" (import path does not begin with hostname)
package sync: unrecognized import path "sync" (import path does not begin with hostname)
package time: unrecognized import path "time" (import path does not begin with hostname)
package unicode: unrecognized import path "unicode" (import path does not begin with hostname)
package unicode/utf8: unrecognized import path "unicode/utf8" (import path does not begin with hostname)
package io/ioutil: unrecognized import path "io/ioutil" (import path does not begin with hostname)
package path/filepath: unrecognized import path "path/filepath" (import path does not begin with hostname)
package go/doc: unrecognized import path "go/doc" (import path does not begin with hostname)
package net/url: unrecognized import path "net/url" (import path does not begin with hostname)
package syscall: unrecognized import path "syscall" (import path does not begin with hostname)
package unsafe: unrecognized import path "unsafe" (import path does not begin with hostname)
package os/exec: unrecognized import path "os/exec" (import path does not begin with hostname)
package os/user: unrecognized import path "os/user" (import path does not begin with hostname)
package runtime: unrecognized import path "runtime" (import path does not begin with hostname)
make: *** [Makefile:58:setup] 错误 1
经过最终搜索在github上找到了相对的解决方法:
最终通过执行:unset GOROOT 解决问题;
https://github.com/Rivalo/discord-cli/issues/33
golang程序编译时提示“package runtime: unrecognized import path "runtime" (import path does not begin with hostname)”的更多相关文章
- 编译时提示软件包 javax.servlet.http 不存在 import javax.servlet.http.HttpServletRequest;
编译时错误:软件包 javax.servlet.http 不存在import javax.servlet.http.HttpServletRequest; 解决办法:把servlet-api.jar加 ...
- WPF编译时提示“...不包含适合于入口点的静态‘Main’方法 ...”
今天看了一下wpf的Application类方面的知识,一个windows应用程序由一个Application类的实例表示,该类跟踪在应用程序中打开的所有窗口,决定何时关闭应用程序(属性 Shutdo ...
- vc6.0 点编译时提示Cannot complile the file 'D:\souce-code\vc-workspace\对话框\MainFrm.h'; no compile tool is
问题描写叙述: vc6.0程序,点击编译时提示对话框,内容为: Cannot complile the file 'D:\souce-code\vc-workspace\对话框\MainFrm.h'; ...
- ant编译时提示一大堆软件包不存在的问题
ant编译时提示一大堆软件包不存在的问题 解决方案: 把项目的 lib 里的jar包 放的 jdk的jre的ext的目录下 例如 java home 是 D:JavaEEJavajdk1.8.0_1 ...
- 程序编译时书写Makefile注意事项一例
在进行程序编译时,可能需要指定一些库的库的路径.头文件的路径,分别使用的参数选项是-L和-I,需要注意的是: 需要确保-L和-I后边的内容不为空,否则会出现意想不到的错误,而这种错误比较难以发现,引起 ...
- WPF编译时提示"xxx不包含适合于入口点的静态 Main方法xxx"
WPF编译时提示"xxx不包含适合于入口点的静态 Main方法xxx"生成的时候一直报"xxx不包含适合于入口点的静态 Main 方法xxx" 看到这个问题首先 ...
- Gtksharp编译时提示下载gtk文件问题
Gtksharp编译时提示下载gtk文件问题 1.昨天晚上新建gtksharp项目之后,安装gtksharp之后,编译时无法成功,提示无法下载gtk-3.24.zip 2.记得前几天,另一个项目可以生 ...
- VS2010 项目引用了DLL文件,也写了Using,但是编译时提示:未能找到类型或命名空间名称 <转>
昨天写了一个很小的winform程序,其中引用了自己写的两个dll文件. 本来认为轻松搞定,结果一编译居然提示:未能找到类型或命名空间名称..... 于是删掉两个dll重新引用,再编译结果依旧!很是郁 ...
- VC2010编译时提示:转换到 COFF 期间失败: 文件无效或损坏
有时候新安装好VS2010后编译时就提示上述错误,罗列一下从网上查找到的几种解决方案: 方案1: 点击“项目”-->“属性”--> “清单工具”, 然后选择"输入和输出’--&g ...
随机推荐
- 【前端_js】Bootstrap之表单验证
Bootstrap表单验证插件bootstrapValidator使用方法整理 BootstrapValidator 表单验证超详细教程
- prometheus学习系列一: Prometheus简介
Prometheus简介 prometheus受启发于Google的Brogmon监控系统(相似kubernetes是从Brog系统演变而来), 从2012年开始由google工程师Soundclou ...
- linux中网络部分的总结
二.简述iproute家族命令 静态配置地址的方法有一下几种方式: (1)ifconfig (2)ip命令 (3)GUI工具 (4)TUI工具 (5)编辑配置文件 1.ifconfig 查看接口:if ...
- maven nexus 私服搭建 Linux版
准备工作 已安装jdk 已安装maven 下载Nexus Repository OSS:https://www.sonatype.com/download-oss-sonatype 如果无法下载成功, ...
- 蓝桥杯如何训练?(附VIP题库)
https://www.dotcpp.com/ 给大家介绍下蓝桥杯,是近几年可以说国内名气最大的程序设计类比赛了 相比国际赛事ACM,蓝桥杯入门简单.中文答题.拿奖率高,更适合国内大众化参加,近几年不 ...
- 【使用DIV+CSS重写网站首页案例】步骤分析与代码实现
使用DIV+CSS重写网站首页案例 步骤分析: 第一步:先定义一个大的 div(整个页面),然后嵌套 8 个小的 div(共八行): 第二步:(第一行)在第一个 div 里面嵌套 3 个小的 div: ...
- Fire Balls 03—— 多个圆环以及圆环的变速变向
版权申明: 本文原创首发于以下网站: 博客园『优梦创客』的空间:https://www.cnblogs.com/raymondking123 优梦创客的官方博客:https://91make.top ...
- BST二叉树的二分查找
900. 二叉搜索树中最接近的值 中文 English 给一棵非空二叉搜索树以及一个target值,找到在BST中最接近给定值的节点值 样例 样例1 输入: root = {5,4,9,2,#,8,1 ...
- 如何将 egg-validate 插件的错误提示,修改为中文?
方案一(需要找到所有的提示并对应成中文,不是一个好方案:例子地址:https://github.com/cag2050/egg_mysql_demo/blob/master/app/controlle ...
- IMP self _cmd
The only way to circumvent dynamic binding is to get the address of a method and call it directly as ...