go-acme / lego

Let's Encrypt/ACME client and library written in Go
https://go-acme.github.io/lego/
MIT License
8.04k stars 1.03k forks source link

Unable to install with Go 1.12.12 and 1.13.3 #993

Closed jensdrenhaus closed 5 years ago

jensdrenhaus commented 5 years ago

Hi, I get an error when I try to install lego from source:

Go 1.12.12 ```console jens@jens-thinkpad:~$ go version go version go1.12.12 linux/amd64 jens@jens-thinkpad:~$ GO111MODULE=on go get -u github.com/go-acme/lego/cmd/lego go: finding github.com/go-acme/lego/cmd/lego latest go: finding github.com/go-acme/lego/cmd latest go: finding github.com/rainycape/memcache latest go: finding github.com/labbsr0x/bindman-dns-webhook/src/client latest go: finding github.com/labbsr0x/bindman-dns-webhook/src latest go: finding github.com/Azure/go-autorest/autorest/azure latest go: finding golang.org/x/oauth2/clientcredentials latest go: finding golang.org/x/crypto/ocsp latest go: finding golang.org/x/net/idna latest go: finding golang.org/x/net/publicsuffix latest go: finding golang.org/x/oauth2 latest go: finding golang.org/x/crypto latest go: finding golang.org/x/net latest go: finding github.com/namedotcom/go/namecom latest go: finding github.com/namedotcom/go latest go: finding github.com/timewasted/linode/dns latest go: finding github.com/timewasted/linode latest go: finding github.com/aws/aws-sdk-go/aws/session latest go: finding github.com/aws/aws-sdk-go/aws latest go: finding github.com/aws/aws-sdk-go/service/route53 latest go: finding github.com/aws/aws-sdk-go/service latest go: finding github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests latest go: finding github.com/aliyun/alibaba-cloud-sdk-go/sdk latest go: finding github.com/aliyun/alibaba-cloud-sdk-go latest go: finding github.com/aws/aws-sdk-go/service/lightsail latest go: finding github.com/aliyun/alibaba-cloud-sdk-go/services/alidns latest go: finding github.com/aliyun/alibaba-cloud-sdk-go/services latest go: finding github.com/aws/aws-sdk-go/aws/client latest go: finding github.com/sacloud/libsacloud/api latest go: finding github.com/sacloud/libsacloud/sacloud latest go: finding github.com/OpenDNS/vegadns2client latest go: finding github.com/iij/doapi latest go: finding github.com/dnsimple/dnsimple-go/dnsimple latest go: finding github.com/gophercloud/gophercloud/openstack/dns/v2/zones latest go: finding github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets latest go: finding github.com/gophercloud/gophercloud/openstack/dns/v2 latest go: finding github.com/gophercloud/gophercloud/openstack/dns latest go: finding github.com/gophercloud/gophercloud/openstack latest go: finding github.com/aws/aws-sdk-go/aws/request latest go: finding golang.org/x/oauth2/google latest go: finding github.com/ovh/go-ovh/ovh latest go: finding github.com/ovh/go-ovh latest go: finding github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials latest go: finding github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth latest go: finding github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-09-01/dns latest go: finding github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2017-09-01 latest go: finding github.com/Azure/azure-sdk-for-go/services/dns/mgmt latest go: finding github.com/Azure/azure-sdk-for-go/services/dns latest go: finding github.com/Azure/azure-sdk-for-go/services latest go: finding google.golang.org/api/googleapi latest go: finding google.golang.org/api/dns latest go: finding github.com/iij/doapi/protocol latest go: finding github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid latest go: finding github.com/akamai/AkamaiOPEN-edgegrid-golang/configdns-v1 latest go: finding google.golang.org/api/option latest go: finding github.com/oracle/oci-go-sdk/common latest go: finding github.com/oracle/oci-go-sdk/dns latest go: finding golang.org/x/net/context latest go: finding github.com/transip/gotransip/domain latest go: finding gopkg.in/ns1/ns1-go.v2 latest # github.com/go-acme/lego/providers/dns/designate go/pkg/mod/github.com/go-acme/lego@v2.7.2+incompatible/providers/dns/designate/designate.go:206:3: cannot use record.TTL (type int) as type *int in field value ```
...
# github.com/go-acme/lego/providers/dns/designate
go/pkg/mod/github.com/go-acme/lego@v2.7.2+incompatible/providers/dns/designate/designate.go:206:3: cannot use record.TTL (type int) as type *int in field value

same happens with go version 13.3:

Go 1.13.3 ```console jens@jens-thinkpad:~$ go version go version go1.13.3 linux/amd64 jens@jens-thinkpad:~$ GO111MODULE=on go get -u github.com/go-acme/lego/cmd/lego go: finding gopkg.in/ns1/ns1-go.v2 latest go: finding golang.org/x/crypto latest go: finding github.com/rainycape/memcache latest go: finding golang.org/x/oauth2 latest go: finding golang.org/x/net latest go: finding github.com/timewasted/linode latest go: finding github.com/ovh/go-ovh latest go: finding github.com/namedotcom/go latest go: finding github.com/OpenDNS/vegadns2client latest go: finding github.com/iij/doapi latest go: finding github.com/aliyun/alibaba-cloud-sdk-go latest go: finding google.golang.org/genproto latest go: finding golang.org/x/sys latest go: finding github.com/jmespath/go-jmespath latest go: finding github.com/modern-go/concurrent latest go: finding github.com/kolo/xmlrpc latest go: finding golang.org/x/time latest go: finding github.com/golang/groupcache latest # github.com/go-acme/lego/providers/dns/designate go/pkg/mod/github.com/go-acme/lego@v2.7.2+incompatible/providers/dns/designate/designate.go:206:3: cannot use record.TTL (type int) as type *int in field value ```
dmke commented 5 years ago

Here's what I got, using Go 1.13.3, both with GOPROXY=proxy.golang.org and GOPROXY=direct:

Console output ```console $ go version go version go1.13.3 linux/amd64 $ lego -version zsh: command not found: lego $ cd $(mktemp -d) $ GO111MODULE=on go get -u github.com/go-acme/lego/v3/cmd/lego go: finding github.com/go-acme/lego/v3/cmd latest go: finding github.com/go-acme/lego/v3/cmd/lego latest go: finding github.com/go-acme/lego/v3 v3.1.0 go: downloading github.com/go-acme/lego/v3 v3.1.0 go: extracting github.com/go-acme/lego/v3 v3.1.0 go: finding golang.org/x/sync latest go: finding google.golang.org/api v0.11.0 go: finding gopkg.in/ns1/ns1-go.v2 latest go: finding github.com/jmespath/go-jmespath latest go: finding github.com/Azure/go-autorest/autorest/azure/auth v0.4.0 go: finding github.com/kolo/xmlrpc latest go: finding github.com/linode/linodego v0.12.0 go: finding golang.org/x/oauth2 latest go: finding google.golang.org/grpc v1.24.0 go: finding google.golang.org/genproto latest go: finding github.com/Azure/go-autorest/autorest v0.9.2 go: finding github.com/aws/aws-sdk-go v1.25.15 go: finding github.com/miekg/dns v1.1.22 go: finding github.com/timewasted/linode latest go: finding golang.org/x/net latest go: finding github.com/OpenDNS/vegadns2client latest go: finding golang.org/x/sys latest go: finding cloud.google.com/go v0.47.0 go: finding gopkg.in/ini.v1 v1.49.0 go: finding github.com/cloudflare/cloudflare-go v0.10.6 go: finding google.golang.org/appengine v1.6.5 go: finding github.com/ovh/go-ovh latest go: finding github.com/grpc-ecosystem/grpc-gateway v1.11.3 go: finding github.com/modern-go/concurrent latest go: finding golang.org/x/time latest go: finding github.com/aliyun/alibaba-cloud-sdk-go latest go: finding golang.org/x/crypto latest go: finding github.com/Azure/go-autorest/autorest/adal v0.8.0 go: finding github.com/go-ini/ini v1.49.0 go: finding github.com/rainycape/memcache latest go: finding github.com/oracle/oci-go-sdk v12.1.0+incompatible go: finding github.com/gophercloud/gophercloud v0.6.0 go: finding github.com/namedotcom/go latest go: finding github.com/iij/doapi latest go: finding github.com/vultr/govultr v0.1.5 go: finding github.com/Azure/azure-sdk-for-go v34.2.0+incompatible go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.0 go: downloading github.com/miekg/dns v1.1.22 go: downloading github.com/cloudflare/cloudflare-go v0.10.6 go: downloading github.com/aws/aws-sdk-go v1.25.15 go: downloading golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582 go: downloading golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 go: downloading google.golang.org/api v0.11.0 go: extracting github.com/miekg/dns v1.1.22 go: downloading github.com/sacloud/libsacloud v1.27.1 go: extracting github.com/cloudflare/cloudflare-go v0.10.6 go: extracting golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 go: downloading github.com/vultr/govultr v0.1.5 go: extracting golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582 go: extracting github.com/vultr/govultr v0.1.5 go: downloading github.com/linode/linodego v0.12.0 go: downloading github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20191018104822-1a1989a8bf37 go: downloading github.com/oracle/oci-go-sdk v12.1.0+incompatible go: extracting github.com/linode/linodego v0.12.0 go: extracting github.com/oracle/oci-go-sdk v12.1.0+incompatible go: extracting github.com/cpuguy83/go-md2man/v2 v2.0.0 go: extracting github.com/sacloud/libsacloud v1.27.1 go: downloading github.com/Azure/azure-sdk-for-go v34.2.0+incompatible go: downloading github.com/Azure/go-autorest/autorest v0.9.2 go: extracting github.com/Azure/go-autorest/autorest v0.9.2 go: downloading github.com/Azure/go-autorest/autorest/adal v0.8.0 go: extracting github.com/Azure/go-autorest/autorest/adal v0.8.0 go: extracting github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20191018104822-1a1989a8bf37 go: extracting github.com/aws/aws-sdk-go v1.25.15 go: extracting google.golang.org/api v0.11.0 go: downloading github.com/gophercloud/gophercloud v0.6.0 go: downloading github.com/Azure/go-autorest/autorest/to v0.3.0 go: downloading gopkg.in/ini.v1 v1.49.0 go: extracting gopkg.in/ini.v1 v1.49.0 go: downloading gopkg.in/ns1/ns1-go.v2 v2.0.0-20191010201104-2adb9d02ee18 go: extracting gopkg.in/ns1/ns1-go.v2 v2.0.0-20191010201104-2adb9d02ee18 go: downloading github.com/go-ini/ini v1.49.0 go: extracting github.com/go-ini/ini v1.49.0 go: downloading go.uber.org/ratelimit v0.1.0 go: downloading github.com/Azure/go-autorest/autorest/date v0.2.0 go: downloading google.golang.org/appengine v1.6.5 go: downloading github.com/Azure/go-autorest/autorest/azure/auth v0.4.0 go: extracting google.golang.org/appengine v1.6.5 go: downloading github.com/Azure/go-autorest/tracing v0.5.0 go: extracting github.com/gophercloud/gophercloud v0.6.0 go: downloading golang.org/x/sys v0.0.0-20191018095205-727590c5006e go: downloading github.com/liquidweb/liquidweb-go v1.6.1 go: downloading go.opencensus.io v0.22.1 go: extracting golang.org/x/sys v0.0.0-20191018095205-727590c5006e go: downloading google.golang.org/grpc v1.24.0 go: extracting github.com/Azure/go-autorest/autorest/azure/auth v0.4.0 go: extracting github.com/Azure/go-autorest/autorest/to v0.3.0 go: downloading cloud.google.com/go v0.47.0 go: extracting google.golang.org/grpc v1.24.0 go: extracting go.uber.org/ratelimit v0.1.0 go: downloading github.com/Azure/go-autorest/autorest/azure/cli v0.3.0 go: downloading google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 go: extracting github.com/liquidweb/liquidweb-go v1.6.1 go: downloading github.com/kolo/xmlrpc v0.0.0-20190909154602-56d5ec7c422e go: extracting github.com/kolo/xmlrpc v0.0.0-20190909154602-56d5ec7c422e go: extracting cloud.google.com/go v0.47.0 go: extracting go.opencensus.io v0.22.1 go: downloading github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 go: extracting github.com/Azure/go-autorest/autorest/date v0.2.0 go: extracting google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 go: extracting github.com/Azure/go-autorest/tracing v0.5.0 go: extracting github.com/Azure/go-autorest/autorest/azure/cli v0.3.0 go: extracting github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 go: extracting github.com/Azure/azure-sdk-for-go v34.2.0+incompatible go: downloading github.com/Azure/go-autorest/autorest/validation v0.2.0 go: extracting github.com/Azure/go-autorest/autorest/validation v0.2.0 go: finding github.com/golang/groupcache latest go: downloading github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc go: extracting github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc $ lego -version lego version dev linux/amd64 ```

Did you run go get -u ... directly in your home directory? Do you have a ~/go.mod or ~/go.sum file? If so, these might be a cause of confusion. Please remove them.

Please also try the following (-v = verbose):

$ go get -u -v github.com/go-acme/lego/cmd/lego
jensdrenhaus commented 5 years ago

Thanks for your quick response. With go get -u github.com/go-acme/lego/v3/cmd/lego everything is fine. At your doku ( https://go-acme.github.io/lego/installation/ )/v3/ is missing in the path. So I tried go get -u github.com/go-acme/lego/cmd/lego, that was the problem.

dmke commented 5 years ago

Oh, I see. I'll update the docs in a moment.

Thanks for reporting!