Install dgraph tools on mac os x without admin/sudo

What I want to do

I want to install the command-line “dgraph” tool on my Macbook. I do not have admin/sudo privileges.

What I did

I downloaded the client from website (Downloads | Dgraph), but the script requires sudo: curl -sSf https://get.dgraph.io | bash

Can you use the docker ?

I have the Docker image running. But I can’t get from docker to my cloud deployment. Need tools on my mac.

The install script needs the sudo. But you can just download the Dgraph’s binary and move it to /usr/local/bin/ - Note that Dgraph will not support Darwin in future releases. We recommend you use Docker or some Linux distro.

Thanks for the tip. That got me a bit further…

  1. I downloaded and extracted https://github.com/dgraph-io/dgraph/releases/download/v20.11.2/dgraph-darwin-amd64.tar.gz
  2. I attempt to run the “dgraph” binary but Mac tells me that “dgraph” cannot be opened because the developer cannot be verified.

Is there a verified binary I can download?

MichelDiz, as noted above, I need to run the “dgraph” tool to connect to my cloud deployment (I’m doing a live load). Therefore I cannot use Docker. Can you suggest a path forward that is futureproof? Perhaps simply run a Linux VM where the linux binary will run?

OK I’m all set here. I downloaded the Linux binary from github and was able to run it on a Linux VM in the cloud. Thanks.

1 Like

Sorry for the late reply

Nope, in general, you can ignore that going to macOS settings, security, and state there that you still wanna run that binary.

For the benefit of those searching on building for Mac/OS-X/Big Sur… I was able to build the dgraph image on Big Sur using M1/Apple Silicon.

git clone https://github.com/dgraph-io/dgraph.git
cd dgraph/dgraph
make dgraph

I always recommend using the Docker image, but for things like using the bulkloader or just being able to view all the command flags, it’s nice to have a native build.