m13253 / dns-over-https

High performance DNS over HTTPS client & server
https://developers.google.com/speed/public-dns/docs/dns-over-https
MIT License
1.96k stars 221 forks source link

Uname darwin #114

Closed mrsnax closed 2 years ago

mrsnax commented 3 years ago

Hi

I tried to install dns-over-https with command make, and I got stuck on uname darwin. Here's my results below :

root@vps:~/dns-over-https-2.2.5# make
go get -d -u -v github.com/m13253/dns-over-https/doh-client/config
go: downloading github.com/BurntSushi/toml v0.3.1
go: downloading github.com/BurntSushi/toml v0.4.1
go get: upgraded github.com/BurntSushi/toml v0.3.1 => v0.4.1
go get -d -u -v github.com/m13253/dns-over-https/json-dns
go: downloading github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9
go: downloading github.com/miekg/dns v1.1.41
go: downloading github.com/miekg/dns v1.1.43
go: downloading golang.org/x/net v0.0.0-20210324205630-d1beb07c2056
go: downloading golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d
go: downloading golang.org/x/sys v0.0.0-20210324051608-47abb6519492
go: downloading golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069
go get: upgraded github.com/miekg/dns v1.1.41 => v1.1.43
go get: upgraded golang.org/x/net v0.0.0-20210324205630-d1beb07c2056 => v0.0.0-20210805182204-aaa1db679c0d
go get: upgraded golang.org/x/sys v0.0.0-20210324051608-47abb6519492 => v0.0.0-20210806184541-e5e7981a1069
go get -d -v ./doh-client ./doh-server
go: downloading github.com/gorilla/handlers v1.4.0
go: downloading golang.org/x/text v0.3.6
cd doh-client && go build
cd doh-server && go build
if [ "`uname`" = "Darwin" ]; then \
    make -C darwin-wrapper; \
fi

My VPS is ubuntu 18.04 and installed the latest Go.

How can I do?

Thanks

m13253 commented 3 years ago

Sorry but would you please reformat the log using three backticks?

mrsnax commented 3 years ago

Done reformated

mrsnax commented 3 years ago

UPDATE

after trying again reinstall go now I got a error :

Makefile:61: recipe for target 'deps' failed
make: *** [deps] Error 1

Any solution? Thanks

m13253 commented 3 years ago

This is a strange problem, and it seems that the cause is not at my part.

There might be some issue with your system: does it have enough memory and disk space? Have you tried to restart the system?

mrsnax commented 3 years ago

@m13253

My systems specs are

image

And I've tried to restart seem nothing work

m13253 commented 3 years ago

This is very strange. Have you tried to manually type the build command?

cd doh-client
go build
cd ..

cd doh-server
go build
cd ..

The program will be built to doh-client/doh-client and doh-server/doh-server.

mrsnax commented 3 years ago

This is very strange. Have you tried to manually type the build command?

cd doh-client
go build
cd ..

cd doh-server
go build
cd ..

The program will be built to doh-client/doh-client and doh-server/doh-server.

Hi,

I try to doh-serverand execute go build :

root@vps:~/dns-over-https-2.2.5/doh-server# go build
google.go:27:2: cannot find package "context" in any of:
    /usr/lib/go-1.6/src/context (from $GOROOT)
    /root/go/src/context (from $GOPATH)
config.go:30:2: cannot find package "github.com/BurntSushi/toml" in any of:
    /usr/lib/go-1.6/src/github.com/BurntSushi/toml (from $GOROOT)
    /root/go/src/github.com/BurntSushi/toml (from $GOPATH)
server.go:40:2: cannot find package "github.com/gorilla/handlers" in any of:
    /usr/lib/go-1.6/src/github.com/gorilla/handlers (from $GOROOT)
    /root/go/src/github.com/gorilla/handlers (from $GOPATH)
google.go:37:2: cannot find package "github.com/m13253/dns-over-https/json-dns" in any of:
    /usr/lib/go-1.6/src/github.com/m13253/dns-over-https/json-dns (from $GOROOT)
    /root/go/src/github.com/m13253/dns-over-https/json-dns (from $GOPATH)
google.go:38:2: cannot find package "github.com/miekg/dns" in any of:
    /usr/lib/go-1.6/src/github.com/miekg/dns (from $GOROOT)
    /root/go/src/github.com/miekg/dns (from $GOPATH)
google.go:39:2: cannot find package "golang.org/x/net/idna" in any of:
    /usr/lib/go-1.6/src/golang.org/x/net/idna (from $GOROOT)
    /root/go/src/golang.org/x/net/idna (from $GOPATH)

and trying to execute go build inside doh-client folder :

root@vps:~/dns-over-https-2.2.5/doh-client# go build
client.go:27:2: cannot find package "context" in any of:
    /usr/lib/go-1.6/src/context (from $GOROOT)
    /root/go/src/context (from $GOPATH)
client.go:41:2: cannot find package "github.com/m13253/dns-over-https/doh-client/config" in any of:
    /usr/lib/go-1.6/src/github.com/m13253/dns-over-https/doh-client/config (from $GOROOT)
    /root/go/src/github.com/m13253/dns-over-https/doh-client/config (from $GOPATH)
client.go:42:2: cannot find package "github.com/m13253/dns-over-https/doh-client/selector" in any of:
    /usr/lib/go-1.6/src/github.com/m13253/dns-over-https/doh-client/selector (from $GOROOT)
    /root/go/src/github.com/m13253/dns-over-https/doh-client/selector (from $GOPATH)
client.go:43:2: cannot find package "github.com/m13253/dns-over-https/json-dns" in any of:
    /usr/lib/go-1.6/src/github.com/m13253/dns-over-https/json-dns (from $GOROOT)
    /root/go/src/github.com/m13253/dns-over-https/json-dns (from $GOPATH)
client.go:44:2: cannot find package "github.com/miekg/dns" in any of:
    /usr/lib/go-1.6/src/github.com/miekg/dns (from $GOROOT)
    /root/go/src/github.com/miekg/dns (from $GOPATH)
client.go:45:2: cannot find package "golang.org/x/net/http2" in any of:
    /usr/lib/go-1.6/src/golang.org/x/net/http2 (from $GOROOT)
    /root/go/src/golang.org/x/net/http2 (from $GOPATH)
client.go:46:2: cannot find package "golang.org/x/net/idna" in any of:
    /usr/lib/go-1.6/src/golang.org/x/net/idna (from $GOROOT)
    /root/go/src/golang.org/x/net/idna (from $GOPATH)

I've tried to execute go clean still nothing work

m13253 commented 3 years ago

I see the reason: You are using Go 1.6 (released in 2016).

I would suggest you to upgrade Go 1.16 first. Pay attention if you installed golang-1.16 package through apt, the binaries might be installed into /usr/lib/go-1.16/bin instead of /usr/bin.

Another method is just to compile the code on your PC. Setting environment variables GOOS=linux, GOARCH=amd64, CGO_ENABLED=0 will allow you to cross-compile a Linux version even on Windows.

Personally I would also suggest you to upgrade to Ubuntu 20.04 (which has security updates until 2030) or Ubuntu 21.04 (which has security updates until 2022). But this depends on whether all your applications can support newer versions of OS.

captainhook commented 2 years ago

I have tried with Go 1.16 and get the following error:

cow@pi1:~/dns-over-https$ go version
go version go1.16 linux/amd64
cow@pi1:~/dns-over-https$ which go
/usr/local/go/bin/go
cow@pi1:~/dns-over-https$ $GOROOT
-bash: /usr/local/go/: Is a directory
cow@pi1:~/dns-over-https$ $GOPATH
-bash: /home/cow/go: Is a directory
cow@pi1:~/dns-over-https$ make
cd doh-client && /usr/local/go//bin/go build
client.go:41:2: cannot find package "github.com/m13253/dns-over-https/v2/doh-client/config" in any of:
        /usr/local/go/src/github.com/m13253/dns-over-https/v2/doh-client/config (from $GOROOT)
        /home/cow/go/src/github.com/m13253/dns-over-https/v2/doh-client/config (from $GOPATH)
client.go:42:2: cannot find package "github.com/m13253/dns-over-https/v2/doh-client/selector" in any of:
        /usr/local/go/src/github.com/m13253/dns-over-https/v2/doh-client/selector (from $GOROOT)
        /home/cow/go/src/github.com/m13253/dns-over-https/v2/doh-client/selector (from $GOPATH)
client.go:43:2: cannot find package "github.com/m13253/dns-over-https/v2/json-dns" in any of:
        /usr/local/go/src/github.com/m13253/dns-over-https/v2/json-dns (from $GOROOT)
        /home/cow/go/src/github.com/m13253/dns-over-https/v2/json-dns (from $GOPATH)
client.go:44:2: cannot find package "github.com/miekg/dns" in any of:
        /usr/local/go/src/github.com/miekg/dns (from $GOROOT)
        /home/cow/go/src/github.com/miekg/dns (from $GOPATH)
client.go:45:2: cannot find package "golang.org/x/net/http2" in any of:
        /usr/local/go/src/golang.org/x/net/http2 (from $GOROOT)
        /home/cow/go/src/golang.org/x/net/http2 (from $GOPATH)
client.go:46:2: cannot find package "golang.org/x/net/idna" in any of:
        /usr/local/go/src/golang.org/x/net/idna (from $GOROOT)
        /home/cow/go/src/golang.org/x/net/idna (from $GOPATH)
Makefile:57: recipe for target 'doh-client/doh-client' failed
make: *** [doh-client/doh-client] Error 1

I hate to ask with such an error but I've exhausted my search... any tips?

Edit: Ok nevermind. I tried again with v2.2.5 and it works fine. It's only with today's v2.3.0 release which I am seeing this error.

m13253 commented 2 years ago

I hate to ask with such an error but I've exhausted my search... any tips?

Try Go 1.17.1 first?