Skip to content

Instantly share code, notes, and snippets.

@teslamint
Last active December 15, 2022 18:11
Show Gist options
  • Save teslamint/4c045de778d1d070bd15a2effa021aaf to your computer and use it in GitHub Desktop.
Save teslamint/4c045de778d1d070bd15a2effa021aaf to your computer and use it in GitHub Desktop.
Install cloudflared into Turris Omnia(OpenWrt 19.07)
#!/bin/sh
opkg update
opkg install golang gcc
# ref: https://forum.openwrt.org/t/usr-bin-ld-cannot-find-lpthread/18404/10
ar -rc /usr/lib/libpthread.a
ar -rc /usr/lib/libl.a
ar -rc /usr/lib/libdl.a
go get github.com/cloudflare/cloudflared/cmd/cloudflared
mv go/bin/cloudflared /usr/bin/
@privaterra
Copy link

go get github.com/cloudflare/cloudflared/cmd/cloudflared - Does not seem to work as get the message below:

go: go.mod file not found in current directory or any parent directory.
	'go get' is no longer supported outside a module.
	To build and install a command, use 'go install' with a version,
	like 'go install example.com/cmd@latest'
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.

Instead try the following?
go install github.com/cloudflare/cloudflared/cmd/cloudflared@latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment