1
2Problem:
3```sh
4install: can't change permissions of /usr/local/bin: Operation not permitted
5```
6
7```sh
8"Unable to remove symlink. You must have SUDO privileges"
9```
10
11```sh
12"Unable to create symlink. You must have SUDO privileges"
13```
14
15```sh
16install: cannot create regular file '/usr/local/bin/tfswitch': Permission denied
17```
18
19Solution: You probably need to have privileges to install *tfswitch* at /usr/local/bin.
20
21Try the following:
22
23```sh
24wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh  #Get the installer on to your machine:
25
26chmod 755 install.sh #Make installer executable
27
28./install.sh -b $HOME/.bin #Install tfswitch in a location you have permission:
29
30$HOME/.bin/tfswitch #test
31
32export PATH=$PATH:$HOME/.bin #Export your .bin into your path
33
34#You should probably add step 4 in your `.bash_profile` in your $HOME directory.
35
36#Next, try:
37`tfswitch -b $HOME/.bin/terraform 0.11.7`
38
39#or simply
40
41`tfswitch -b $HOME/.bin/terraform`
42
43
44```
45
46See the custom directory option `-b`:
47<img src="https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tfswitch/tfswitch-v7.gif" alt="drawing" style="width: 670px;"/>
48
49