zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.47k stars 1.16k forks source link

"go install" is not working #3116

Open FedericoMuciaccia opened 6 months ago

FedericoMuciaccia commented 6 months ago

Description of the problem or steps to reproduce

When I run

go install github.com/zyedidia/micro/cmd/micro@latest

I get the following error:

go: finding module for package github.com/blang/semver
go: finding module for package github.com/go-errors/errors
go: finding module for package github.com/flynn/json5
go: finding module for package github.com/dustin/go-humanize
go: finding module for package github.com/mattn/go-isatty
go: finding module for package github.com/mattn/go-runewidth
go: finding module for package github.com/mitchellh/go-homedir
go: finding module for package github.com/sergi/go-diff/diffmatchpatch
go: finding module for package github.com/yuin/gopher-lua
go: finding module for package github.com/zyedidia/clipboard
go: finding module for package github.com/zyedidia/glob
go: finding module for package github.com/zyedidia/tcell
go: finding module for package github.com/zyedidia/tcell/encoding
go: finding module for package github.com/zyedidia/terminal
go: finding module for package layeh.com/gopher-luar
go: finding module for package gopkg.in/yaml.v2
go: found github.com/blang/semver in github.com/blang/semver v3.5.1+incompatible
go: found github.com/dustin/go-humanize in github.com/dustin/go-humanize v1.0.1
go: found github.com/flynn/json5 in github.com/flynn/json5 v1.0.0
go: found github.com/go-errors/errors in github.com/go-errors/errors v1.5.1
go: found github.com/mattn/go-isatty in github.com/mattn/go-isatty v0.0.20
go: found github.com/mattn/go-runewidth in github.com/mattn/go-runewidth v0.0.15
go: found github.com/mitchellh/go-homedir in github.com/mitchellh/go-homedir v1.1.0
go: found github.com/sergi/go-diff/diffmatchpatch in github.com/sergi/go-diff v1.3.1
go: found github.com/yuin/gopher-lua in github.com/yuin/gopher-lua v1.1.1
go: found github.com/zyedidia/clipboard in github.com/zyedidia/clipboard v1.0.4
go: found github.com/zyedidia/glob in github.com/zyedidia/glob v0.0.0-20170209203856-dd4023a66dc3
go: found github.com/zyedidia/tcell in github.com/zyedidia/tcell v1.4.12
go: found github.com/zyedidia/tcell/encoding in github.com/zyedidia/tcell v1.4.12
go: found github.com/zyedidia/terminal in github.com/zyedidia/terminal v0.0.0-20230315200948-4b3bcf6dddef
go: found layeh.com/gopher-luar in layeh.com/gopher-luar v1.0.11
go: found gopkg.in/yaml.v2 in gopkg.in/yaml.v2 v2.4.0
go: github.com/zyedidia/micro/cmd/micro imports
    github.com/flynn/json5: github.com/flynn/json5@v1.0.0: parsing go.mod:
    module declares its path as: github.com/titanous/json5
            but was required as: github.com/flynn/json5

Specifications

go version go1.18.1 linux/amd64

manishpatel005 commented 4 months ago

Running

go install github.com/zyedidia/micro/cmd/micro@latest

will not work as the GOPROXY has not been updated since v1.4.1. I checked the versions here:

$go list -m --versions github.com/zyedidia/micro@latest
  github.com/zyedidia/micro v1.0.1 v1.0.2 v1.0.3 v1.1.0 v1.1.1 v1.1.2 v1.1.3 v1.1.4 v1.2.0 v1.3.0 v1.3.1 v1.3.2 v1.3.3 v1.3.4 v1.4.0 v1.4.1

In v1.4.1 (go mod link) , the code was using importing json5 module from flynn which does not exist anymore.

One way you can download the module is following:

GOPROXY=direct go install github.com/zyedidia/micro/v2@latest

This will download the module at location $GOPATH/pkg/mod/. But I would suggest that you either git clone it or use

curl https://getmic.ro | bash