Skip to content

Instantly share code, notes, and snippets.

@alexllc
Created June 23, 2024 20:39
Show Gist options
  • Save alexllc/ae11af3a1078f5792fae22f115cfdf11 to your computer and use it in GitHub Desktop.
Save alexllc/ae11af3a1078f5792fae22f115cfdf11 to your computer and use it in GitHub Desktop.
Setting up googledrive sync on Arch linux

Best way to set this up is to install opam (the ocaml package manager) For the current (2024-06-23) version of googledrive ocaml fuse (0.7.32), you can't use the latest version of opam because it uses old packages.

  1. Install opam first (opam - Install)
sudo bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"

Then run

opam init
opam update

If you simply install the googledrive-ocaml-fuse package like that, it will complain that gapi-ocaml 0.4.5 can't be installed because It seems to be for an older version of OCaml. So activate the older version of ocaml by

opam switch create 4.08.0

The requirement on the github page is ocaml >= 4.02.3 but 4.02.3 is way too old, and when you try to switch, it will complain of The compilation of ocaml-base-compiler.4.02.3 failed at "make world.opt".

After it become successful, do

opam init
opam update
opam install google-drive-ocamlfuse

Set up google OAuth on your project

You're all set!

Finally run google-drive-ocamlfuse -id 12345678.apps.googleusercontent.com -secret abcde12345

To set up the Googledrive sync!

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