The error message indicates you do not have permission to write to the specified location.  We suggest you save the license file in one of the three default locations, your home directory, /Library/gurobi or /Library/gurobi811.  Although it is allowed, saving the license file to a non-default location can be error prone.  Please read the documentation in the following link to learn more.

How do I change the license file to the default location?

Correction:  The error message

-bash: ./grbgetkey: Permission denied

indicates you do not have permission to run grbgetkey.     Please check your permissions

ls -l

to change permissions to execute run

chmod u+x grbgetkey

Did you install Gurobi as SU?  You many need to change other file permissions too.

When I open the gurobi, the command window shows up with following commands:

-bash-3.2$exec gurobi.sh -bash: exec: gurobi.sh: not found Please try which grbgetkey this will show us where grbgetkey is located. then execute the following, replacing <grbgetkey directory> and <directory of the symbolic link> with the directories shown from the which grbgetkey command ls -al <grbgetkey directory> ls -al <directory of the symbolic link> Please post the results. It doesn't work -bash-3.2$ which grbgetkey

./grbgetkey

-bash-3.2$ls -al <./grbgetkey directory> -bash: syntax error near unexpected token newline' -bash-3.2$ ls -al ./grbgetkey directory

ls: directory: No such file or directory

-rwxr--r--  1 xhs  staff  0 Sep 23 19:18 ./grbgetkey

-bash-3.2$ls -al directory of the symbolic link ls: directory: No such file or directory ls: link: No such file or directory ls: of: No such file or directory ls: symbolic: No such file or directory ls: the: No such file or directory -bash-3.2$

This looks strange to me:

-rwxr--r--  1 xhs  staff  0 Sep 23 19:18 ./grbgetkey`

You should be running the grbgetkey that is typically in /Library/gurobi_server811/mac64/bin/

1. Can you tell us a bit about how you installed Gurobi?
2. Did you move any of the files once they were installed?
3. Is Gurobi installed in /Library/gurobi811/mac64?

In any case, I'd suggest at this point that you reinstall Gurobi as it appears that there is a problem with the installation.