cannot find package “github.com/gorilla/mux” in any of:

后端 未结 6 900
慢半拍i
慢半拍i 2021-02-13 04:15

I use command go get github.com/gorilla/mux. I made http server using Golang, and I run this program :

package main

import (
    \"fmt\"
    \"htm         


        
6条回答
  •  遥遥无期
    2021-02-13 04:38

    Could you try this steps to debug it:

    1. ls -l /usr/local/go/src/github.com | grep gorilla
    2. cd $GOPATH

      go list ... | grep gorilla

    3. if you din't see gorilla in the above two command, then you need to install it: go get -v -u github.com/gorilla/mux

    Please run this: export PATH=$PATH:$GOPATH/bin

    How about running go run main.go ? is that working, if yes you should be able to do go build from your project path.

提交回复
热议问题