-
Notifications
You must be signed in to change notification settings - Fork 15
Environment Variables
Make sure these environment variables are set properly to ensure the OneLedger Protocol runs properly on your system.
First check that you have a valid GOPATH set for your current profile:
$ echo $GOPATH
YOUR_PREFIX_HERE/go
If you don't see any output from the above command, you need to manually set your GOPATH directory.
First make your desired folder for the GOPATH:
$ mkdir ~/go
Set a GOPATH environment variable in your shell startup script. On macOS, this is ~/.bash_profile
. For different operating systems or shells, the path may be different. For Ubuntu, it may be ~/.bash_profile
or ~/.bashrc
.
For the following examples, we'll assume your shell startup script is in ~/.bash_profile
.
Add the GOPATH environment variables (make sure it matches the directory you created above):
$ echo export GOPATH=\"\$HOME/go\" >> ~/.bash_profile
$ echo export PATH=\"\$PATH:\$GOPATH/bin\" >> ~/.bash_profile
Now set up the environment variables for the Oneledger Protocol:
$ echo export OLROOT="$GOPATH/src/github.com/Oneledger" >> ~/.bash_profile
$ echo export OLREPO="$OLROOT/protocol" >> ~/.bash_profile
$ echo export OLDATA="$GOPATH/test" >> ~/.bash_profile
$ echo export OLTEST="$OLREPO/node/tests" >> ~/.bash_profile
$ echo export OLSCRIPT="$OLREPO/node/scripts" >> ~/.bash_profile
You can log out and log back in to reflect these changes on your system, or you can immediately add these variables by sourcing your startup script.
$ source ~/.bash_profile
© OneLedger 2018-2020 Contact Information