dqrnskni67375 2018-12-20 16:26
浏览 120
已采纳

软件包github.com/matcornic/hermes/v2:在以下任何位置都找不到软件包“ github.com/matcornic/hermes/v2”:

I want to use Golang email template and when I run

go get -u github.com/matcornic/hermes/v2 it returns

package github.com/matcornic/hermes/v2: cannot find package "github.com/matcornic/hermes/v2" in any of: /usr/local/go/src/github.com/matcornic/hermes/v2 (from $GOROOT) /home/User/go/src/github.com/matcornic/hermes/v2 (from $GOPATH)

My go Variables

GOPATH - /home/User/go
GOROOT - /usr/local/go
GOBIN - 

I fight with this error the whole day, But I can't find out a solution. Please help me.

I set MY gopath to another directory several times but it does not work

I am writing code in this directory

/home/User/go/src/Go-Web

and inside Go-Web my current project lies

  • 写回答

1条回答 默认 最新

  • dsqpx86002 2018-12-20 17:01
    关注

    As stated in the README:

    Starting from release v2.0.0, Hermes uses Go modules. The latest version of Hermes requires Go 1.11 with gomodules enabled. You can still use an Hermes release compatible with prior Go versions by using v1.2.0 release

    Either turn on the module feature by unsetting GOPATH, or use version 1 of the package (github.com/matcornic/hermes, without the version suffix).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大