caddy -version)?Pulled commit #1178
Trying to recompile Caddy from source using _build.bash_
(Put Caddyfile here)
$ go get github.com/mholt/caddy
$ cd $GOPATH/src/github.com/mholt/caddy/caddy
$ ./build.bash
Expected to see Caddy's binary in my _$GOPATH/bin_ folder
../../../mholt/caddy/caddyhttp/browse/browse.go:18:2: cannot find package "github.com/dustin/go-humanize" in any of:
/usr/local/go/src/github.com/dustin/go-humanize (from $GOROOT)
/home/ashwin/Documents/go-workspace/src/github.com/dustin/go-humanize (from $GOPATH)
../../../mholt/caddy/caddyhttp/websocket/websocket.go:17:2: cannot find package "github.com/gorilla/websocket" in any of:
/usr/local/go/src/github.com/gorilla/websocket (from $GOROOT)
/home/ashwin/Documents/go-workspace/src/github.com/gorilla/websocket (from $GOPATH)
../../../mholt/caddy/caddyhttp/errors/setup.go:10:2: cannot find package "github.com/hashicorp/go-syslog" in any of:
/usr/local/go/src/github.com/hashicorp/go-syslog (from $GOROOT)
/home/ashwin/Documents/go-workspace/src/github.com/hashicorp/go-syslog (from $GOPATH)
../../../mholt/caddy/caddyhttp/basicauth/basicauth.go:20:2: cannot find package "github.com/jimstudt/http-authentication/basic" in any of:
/usr/local/go/src/github.com/jimstudt/http-authentication/basic (from $GOROOT)
/home/ashwin/Documents/go-workspace/src/github.com/jimstudt/http-authentication/basic (from $GOPATH)
../../../mholt/caddy/caddyhttp/httpserver/server.go:17:2: cannot find package "github.com/lucas-clemente/quic-go/h2quic" in any of:
/usr/local/go/src/github.com/lucas-clemente/quic-go/h2quic (from $GOROOT)
/home/ashwin/Documents/go-workspace/src/github.com/lucas-clemente/quic-go/h2quic (from $GOPATH)
../../../mholt/caddy/caddyhttp/markdown/metadata/metadata_toml.go:6:2: cannot find package "github.com/naoina/toml" in any of:
/usr/local/go/src/github.com/naoina/toml (from $GOROOT)
/home/ashwin/Documents/go-workspace/src/github.com/naoina/toml (from $GOPATH)
../../../mholt/caddy/caddyhttp/httpserver/context.go:15:2: cannot find package "github.com/russross/blackfriday" in any of:
/usr/local/go/src/github.com/russross/blackfriday (from $GOROOT)
/home/ashwin/Documents/go-workspace/src/github.com/russross/blackfriday (from $GOPATH)
../../../mholt/caddy/caddytls/client.go:15:2: cannot find package "github.com/xenolf/lego/acme" in any of:
/usr/local/go/src/github.com/xenolf/lego/acme (from $GOROOT)
/home/ashwin/Documents/go-workspace/src/github.com/xenolf/lego/acme (from $GOPATH)
../../../mholt/caddy/caddytls/certificates.go:13:2: cannot find package "golang.org/x/crypto/ocsp" in any of:
/usr/local/go/src/golang.org/x/crypto/ocsp (from $GOROOT)
/home/ashwin/Documents/go-workspace/src/golang.org/x/crypto/ocsp (from $GOPATH)
../../../mholt/caddy/caddyhttp/httpserver/roller.go:9:2: cannot find package "gopkg.in/natefinch/lumberjack.v2" in any of:
/usr/local/go/src/gopkg.in/natefinch/lumberjack.v2 (from $GOROOT)
/home/ashwin/Documents/go-workspace/src/gopkg.in/natefinch/lumberjack.v2 (from $GOPATH)
../../../mholt/caddy/caddyhttp/markdown/metadata/metadata_yaml.go:6:2: cannot find package "gopkg.in/yaml.v2" in any of:
/usr/local/go/src/gopkg.in/yaml.v2 (from $GOROOT)
/home/ashwin/Documents/go-workspace/src/gopkg.in/yaml.v2 (from $GOPATH)
Well, someone can install latest version of Go, get Caddy from the source by go get github.com/mholt/caddy and then try to compile/run it.
I understand that the problem arises because certain packages are missing. It would be a much cleaner install if during installation the build script automatically finds missing packages and installs them as well.
You need to use go get github.com/mholt/caddy/caddy
I wanted to see if I got the same result and I did, but then I looked at the instructions, you should be running:
go get github.com/mholt/caddy/caddy
I followed the instructions from the README.md & it installed properly.
Edit: @elcore beat me to the response, but as a general recommendation, make sure to read documentation closely. :smile:
@elcore @chaseadamsio - Yes, it did work, I should have read the documentation better. Thank you so much! :+1:
Just in case someone would need to build it:
go get github.com/mholt/caddy/caddy
cd $GOPATH/src/github.com/mholt/caddy/caddy/
go run build.go
Then:
$ caddy --version
Caddy (untracked dev build) (unofficial)
@greenpau Instead of go build, use go run build.go according to the build instructions on the README. It'd be great if you update your post with these instructions, so that others who find this via search don't miss out on proper builds with versioning, etc. It helps a lot in debugging and error reporting.
It'd be great if you update your post with these instructions
@mholt , done 馃憤
Excellent!! Thanks.