# Error setting environment variables by sourcing

I'm a beginner of unix and struggling with problems. One of them is to run the sage in any directory by typing 'sage'. I have failed even I tried this for 4 hours. Please help me.

I'm using OS X 10.9 but I don't want to use 'alias'. As a practice I want to change PATH to make it.

I have tried

1) adding /Users/jeong/work/Sage/sage-6.4.1/local/bin to /etc/path using 'vim /etc/paths' I added it to the path. And I closed terminal. After opening it again and typing 'sage'. I got error messages

Error: You must set the SAGE_ROOT environment variable or run this script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory. Error setting environment variables by sourcing '/usr/local/bin/sage-env'; possibly contact sage-devel (see http://groups.google.com/group/sage-d...).

Even I change the '/Users/jeong/work/Sage/sage-6.4.1/local/bin' to '/Users/jeong/work/Sage/sage-6.4.1', it doesn't work.

2) making a symbolic link to /usr/local/bin command: 'ln -s /Users/jeong/work/Sage/sage-6.4.1/local/bin /usr/local/bin'

error messages :

Error: You must set the SAGE_ROOT environment variable or run this script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory. Error setting environment variables by sourcing '/usr/local/bin/sage-env'; possibly contact sage-devel (see http://groups.google.com/group/sage-d...).

3) making .bash_profile or changing .profile in the home directory

don't work.

edit retag close merge delete

Sort by » oldest newest most voted

The PATH you have to add is not /Users/jeong/work/Sage/sage-6.4.1/local/bin, but /Users/jeong/work/Sage/sage-6.4.1/, this is where the sage script belongs to. Then this script will use what is in /Users/jeong/work/Sage/sage-6.4.1/local/bin.

more