Go building error

What is the problem you are having with rclone?

go build rclone.go isn't running and giving errors.

What is your rclone version (output from rclone version)


Which OS you are using and how many bits (eg Windows 7, 64 bit)

ubuntu, 64 bit

Which cloud storage system are you using? (eg Google Drive)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

go build

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

Can you please provide output? What is the build error?

Both go build and go build rclone.go are giving this same output.
The problem's is in $GOPATH and $GOROOT.

rclone.go:7:2: cannot find package "github.com/rclone/rclone/backend/all" in any of:
	/usr/lib/go-1.10/src/github.com/rclone/rclone/backend/all (from $GOROOT)
	/home/ridhish/go/src/github.com/rclone/rclone/backend/all (from $GOPATH)
rclone.go:8:2: cannot find package "github.com/rclone/rclone/cmd" in any of:
	/usr/lib/go-1.10/src/github.com/rclone/rclone/cmd (from $GOROOT)
	/home/ridhish/go/src/github.com/rclone/rclone/cmd (from $GOPATH)
rclone.go:9:2: cannot find package "github.com/rclone/rclone/cmd/all" in any of:
	/usr/lib/go-1.10/src/github.com/rclone/rclone/cmd/all (from $GOROOT)
	/home/ridhish/go/src/github.com/rclone/rclone/cmd/all (from $GOPATH)
rclone.go:10:2: cannot find package "github.com/rclone/rclone/lib/plugin" in any of:
	/usr/lib/go-1.10/src/github.com/rclone/rclone/lib/plugin (from $GOROOT)
	/home/ridhish/go/src/github.com/rclone/rclone/lib/plugin (from $GOPATH)

It's asking for a src folder in between path and there isn't any in rclone's directory.
It's also mentioned here https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/215

Although the building didn't affect my gui-folder and the web-gui worked fine without building rclone.
Don't know if that was expected behavior or a bug

Have you set GOPATH?

Why are you building such an old rclone with such an old go version?

Thank you, I got the problem, it was with versions. Script installation given at rclone.org/install worked for me.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.