# Rclone Prerequisites Installation ## Installing Rclone on Windows Download `Rclone` if you don't have one. - [Download](https://rclone.org/downloads/) the relevant binary. - Extract the `rclone.exe` binary from the archive - Put `rclone.exe` and `CASB_querier.exe` in the same directory. --- ### :star:For user #### Install prerequisites - To run rclone mount on Windows, you will need to download and install [WinFsp](http://www.secfs.net/winfsp/rel/). --- ### :star:For developer #### Install prerequisites - To run rclone mount on Windows, you will need to download and install [WinFsp](http://www.secfs.net/winfsp/rel/). - :warning:Remember to choose the `Developer` feature - Install gcc [mingw-w64](http://mingw-w64.org/doku.php/start) [[Installation tutorial](https://zhuanlan.zhihu.com/p/76613134)] - Remember to set the environment variable - Install `cgofuse` - Install [Go](https://golang.org/dl/) first if you don't have one. [[Installation tutorial](https://oranwind.org/go-go-yu-yan-yu-windows-shang-zhi-an-zhuang-yu-huan-jing-she-ding/)] - Create a folder under `C:\Go\src`, i.e., `C:\Go\src\github.com\billziss-gh` - Go to the folder and clone [cgofuse](https://github.com/billziss-gh/cgofuse#how-to-build) from GitHub ```shell cd /d C:\Go\src\github.com\billziss-gh git clone https://github.com/billziss-gh/cgofuse.git ``` - Install cgofuse ```shell cd cgofuse set CPATH=C:\Program Files (x86)\WinFsp\inc\fuse go install -v ./fuse ./examples/memfs ``` #### Run Rclone with VSCode ##### Set up Launch.json ```json { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Launch", "type": "go", "request": "launch", "mode": "debug", "program": "${workspaceFolder}", "env": {"CGO_ENABLED":1, "GOARCH":"amd64"}, "args": ["mount"], "buildFlags": "-tags cmount -v" } ] } ``` :warning: Remember to add `CPATH = C:\Program Files (x86)\WinFsp\inc\fuse` into environment variable. #### Troubleshooting - `cc1.exe: sorry, unimplemented: 64-bit mode not compiled in` ``` runtime/cgo # runtime/cgo cc1.exe: sorry, unimplemented: 64-bit mode not compiled in exit status 2 Process exiting with code: 1 ``` - Please make sure you install the 64-bit version of gcc [[Check here](#gcc)] - `fuse_common.h: No such file or directory` ``` runtime/cgo github.com/billziss-gh/cgofuse/fuse # github.com/billziss-gh/cgofuse/fuse C:\Users\user\go\pkg\mod\github.com\billziss-gh\cgofuse@v1.4.0\fuse\host_cgo.go:204:10: fatal error: fuse_common.h: No such file or directory #include <fuse_common.h> ^~~~~~~~~~~~~~~ compilation terminated. exit status 2 Process exiting with code: 1 ``` - Please install `cgofuse` [[Check here](#cgofuse)] ###### tags: `CASB`