【开发工具】解决 Goland 报错:Found several packages [main, xxx] in ...

简介: 【开发工具】解决 Goland 报错:Found several packages [main, xxx] in ...

正文


前两天为了在 Go 语言中使用 oracle 的数据库驱动,安装了个 _ "github.com/godror/godror"包,结果 Goland 就一直报错(红色下划线),作为一个强迫症开发者,是受不了程序里报错的(毕竟程序警告都不想容忍)。报错如下:


12.webp.jpg

报错信息:
Found several packages [main, time] in 'D:/v4_dev_env/go_1_19_2/src/time;D:/v4_dev_env/go_1_19_2/src/time'


其实这是一个 Goland 的版本问题,主要是由于 golang 语言的版本太高了,使用的还是老版本的 Goland,这里更新一下 Goland 就好。

PS:我这里的 goland 版本是 1.19.2;Goland 版本是 2020.3


问题修复:


下载安装 2021.3.5 版本即可恢复。


11.webp.jpg

目录
相关文章
|
5月前
|
编译器 Go 开发工具
JetBrains GoLand 以debug运行Go程序时出现could not launch process: decoding dwarf section info at offset 0x0: too short报错之保姆级别解决方案
JetBrains GoLand 以debug运行Go程序时出现could not launch process: decoding dwarf section info at offset 0x0: too short报错之保姆级别解决方案
48 0
|
6月前
|
Java 编译器 Go
Go 语言 入门 && 基于 GoLand 2023.1 创建第一个Go程序
Go 语言 入门 && 基于 GoLand 2023.1 创建第一个Go程序
56 0
|
5月前
|
IDE Go 开发工具
Go开发IDE全览:GoLand vs VSCode全面解析
Go开发IDE全览:GoLand vs VSCode全面解析
188 0
|
IDE Go 开发工具
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
|
8月前
|
Linux Go Docker
goland如何把go项目打包进docker镜像
goland如何把go项目打包进docker镜像
301 0
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
924 0
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
|
编译器 Go
【七天入门Go语言】Goland && Golang 的安装与配置 | 第一天
【七天入门Go语言】Goland && Golang 的安装与配置 | 第一天
153 0
【七天入门Go语言】Goland && Golang 的安装与配置 | 第一天
|
编译器 Go 开发工具
常见问题之Golang——cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in %PATH%错误
本文主要是对我日常在使用golang时遇到的一些问题与解决方式进行的汇总,在此提供给大家便于排查一些遇到的问题,其中有更好的解决方案可在评论区留言。
933 0
常见问题之Golang——cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in %PATH%错误
|
2月前
|
Go C语言
安装go-sqlite3包时报exec: "gcc": executable file not found in %PATH%解决办法
安装go-sqlite3包时报exec: "gcc": executable file not found in %PATH%解决办法