LoginSignup
0
0

More than 1 year has passed since last update.

Goの外部パッケージが$GOPATH/srcではなく$GOPATH/pkg/modにインストールされる

Last updated at Posted at 2021-06-20

Goの外部パッケージをsrc配下にインストールするには

環境はMacBook (Retina, 12-inch, 2017)
OSはBigSurバージョン11.4
Goはgo1.16.3です。
以下のコマンドを叩くとsrc配下にインストールされるようになります。

$export GO111MODULE=off

例えばその後

$go get github.com/markcheno/go-talib

を叩くと以前はGOPATH/pkg/mod/github.comにインストールされていましたが、GOPATH/srcにgithub.comディレクトリが作成され、正しい場所にインストールされるようになります。

参考

リンク

0
0
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
0
0