8
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

go mod initの実行時にgo: modules disabled inside GOPATH/src by GO111MODULE=auto; see 'go help modules'の対処方法

Last updated at Posted at 2019-05-05

なにこれ

go: modules disabled inside GOPATH/src by GO111MODULE=auto; see 'go help modules' の表示に良く出くわす自分用のメモ

👇みたいな状況

[hh@h-pc server]$ go mod init
go: modules disabled inside GOPATH/src by GO111MODULE=auto; see 'go help modules'

対処方法

GO111MODULE=autoと設定されているのがダメらしいので以下を実行する。

export GO111MODULE=on

go mod init
8
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?