How to install rclone in Ubuntu without root?

I read from https://unix.stackexchange.com/questions/638885/onedrive-on-linux-without-root that I can install rclone without root by following https://rclone.org/install/#linux-installation-from-precompiled-binary

I ran the 1st 3 lines

curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-*-linux-amd64

but the rest still require sudo. How should I proceed?

Copy binary file

sudo cp rclone /usr/bin/
sudo chown root:root /usr/bin/rclone
sudo chmod 755 /usr/bin/rclone

Install manpage

sudo mkdir -p /usr/local/share/man/man1
sudo cp rclone.1 /usr/local/share/man/man1/
sudo mandb 

Run rclone config to setup. See rclone config docs for more details.

rclone config

Solution 1:

Leave out the sudo and change /usr/bin to ~/.local/bin, and /usr/local/share/man by ~/.local/share/man. Create these folders first if you do not already have them.

This installs rclone in your own home folder, not requiring you to be root.

Thus, the commands to install the binary and man page become:

cp rclone ~/.local/bin
chmod +x ~/.local/bin/rclone
cp rclone.1 ~/.local/share/man/man1/

Note that the command, installed this way, will be available only to you, not to other users on the system. To install software for any user of the system, you need to be root, i.e., administrator. There is no way around this.