make error: cannot use cmd.* as type "github.com/urfave/cli".Command in array or slice literal #151

Closed
opened 2025-11-02 03:10:55 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @tjyang on GitHub (Dec 23, 2016).

  • Gitea version (or commit ref):
[me@centos7t01 gitea]$ git show-ref
770e8310bd98681058591cc30e7c9db88c944fea refs/heads/master
770e8310bd98681058591cc30e7c9db88c944fea refs/heads/tjyang
770e8310bd98681058591cc30e7c9db88c944fea refs/remotes/origin/HEAD
770e8310bd98681058591cc30e7c9db88c944fea refs/remotes/origin/master
142d35e8d2baec230ddb565d1265940d59141fab refs/remotes/origin/v0.9
142d35e8d2baec230ddb565d1265940d59141fab refs/tags/v0.9.97
6bcff7828f117af8d51285ce3acba01a7e40a867 refs/tags/v0.9.99
[me@centos7t01 gitea]$
  • Git version:
[me@centos7t01 gitea]$ git --version
git version 1.8.3.1
[me@centos7t01 gitea]$
  • Go versin:
[me@centos7t01 gitea]$ go version
go version go1.7.4 linux/amd64
[me@centos7t01 gitea]$
  • Operating system:
[me@centos7t01 gitea]$ cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[me@centos7t01 gitea]$

Description

Hi
I need some help to compile the code.

[me@centos7t01 gitea]$ make
go build -v -tags '' -ldflags '-s -w -X "main.Version=0.9.99+464-g770e831"' -o gitea
_/home/me/ws/github/gitea
# _/home/me/ws/github/gitea
./main.go:34: cannot use cmd.CmdWeb (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal
./main.go:35: cannot use cmd.CmdServ (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal
./main.go:36: cannot use cmd.CmdUpdate (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal
./main.go:37: cannot use cmd.CmdDump (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal
./main.go:38: cannot use cmd.CmdCert (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal
./main.go:39: cannot use cmd.CmdAdmin (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal
make: *** [gitea] Error 2

...

Originally created by @tjyang on GitHub (Dec 23, 2016). - Gitea version (or commit ref): ``` [me@centos7t01 gitea]$ git show-ref 770e8310bd98681058591cc30e7c9db88c944fea refs/heads/master 770e8310bd98681058591cc30e7c9db88c944fea refs/heads/tjyang 770e8310bd98681058591cc30e7c9db88c944fea refs/remotes/origin/HEAD 770e8310bd98681058591cc30e7c9db88c944fea refs/remotes/origin/master 142d35e8d2baec230ddb565d1265940d59141fab refs/remotes/origin/v0.9 142d35e8d2baec230ddb565d1265940d59141fab refs/tags/v0.9.97 6bcff7828f117af8d51285ce3acba01a7e40a867 refs/tags/v0.9.99 [me@centos7t01 gitea]$ ``` - Git version: ``` [me@centos7t01 gitea]$ git --version git version 1.8.3.1 [me@centos7t01 gitea]$ ``` - Go versin: ``` [me@centos7t01 gitea]$ go version go version go1.7.4 linux/amd64 [me@centos7t01 gitea]$ ``` - Operating system: ``` [me@centos7t01 gitea]$ cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [me@centos7t01 gitea]$ ``` ## Description Hi I need some help to compile the code. ``` [me@centos7t01 gitea]$ make go build -v -tags '' -ldflags '-s -w -X "main.Version=0.9.99+464-g770e831"' -o gitea _/home/me/ws/github/gitea # _/home/me/ws/github/gitea ./main.go:34: cannot use cmd.CmdWeb (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal ./main.go:35: cannot use cmd.CmdServ (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal ./main.go:36: cannot use cmd.CmdUpdate (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal ./main.go:37: cannot use cmd.CmdDump (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal ./main.go:38: cannot use cmd.CmdCert (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal ./main.go:39: cannot use cmd.CmdAdmin (type "code.gitea.io/gitea/vendor/github.com/urfave/cli".Command) as type "github.com/urfave/cli".Command in array or slice literal make: *** [gitea] Error 2 ``` ...
GiteaMirror added the issue/not-a-bug label 2025-11-02 03:10:55 -06:00
Author
Owner

@tboerger commented on GitHub (Dec 23, 2016):

You need to clone the go sources into a proper directory, I'm pretty sure https://docs.gitea.io/en-us/install-from-source/ will guide you into the right direction.

@tboerger commented on GitHub (Dec 23, 2016): You need to clone the go sources into a proper directory, I'm pretty sure https://docs.gitea.io/en-us/install-from-source/ will guide you into the right direction.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#151