bash: sage: command not found

1,096 views
Skip to first unread message

Felipe Torres

unread,
Mar 30, 2012, 10:46:08 AM3/30/12
to sage-s...@googlegroups.com
I recently installed sage on a server and it works because when I go to /usr/local/sage I run ./sage and it runs, but if I want to use it to compile a sage based file it says:

bash: sage: command not found


[root@localhost sage]$ sage
bash: sage: command not found
[root@localhost sage]$ ./sage
----------------------------------------------------------------------
| Sage Version 4.8, Release Date: 2012-01-20 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage:

Can anyone tell me how can I run sage to compile or run a file, if I need to configure something or install something else?

Jan Groenewald

unread,
Mar 30, 2012, 11:31:47 AM3/30/12
to sage-s...@googlegroups.com
Hi


Try

sudo ln -s /usr/local/sage/sage /usr/local/bin/sage

amd them run sage again.

Regards,
Jan

--
  .~.
  /V\     Jan Groenewald
 /( )\    www.aims.ac.za
 ^^-^^


Johan Grönqvist

unread,
Mar 30, 2012, 11:34:24 AM3/30/12
to sage-s...@googlegroups.com

Short version:

Try running
export PATH=$PATH:/path/to/your/sage/program
and try again.


Longer version:

Bash does not find the sage executable because it is not in the PATH. By
adding the path to the sage program to your PATH, bash will know how to
find it. In my case sage is in "/home/johan/Applications/":

johan@johan-laptop:~/Applications$ sage


bash: sage: command not found

johan@johan-laptop:~/Applications$ ./sage
----------------------------------------------------------------------
| Sage Version 5.0.beta5, Release Date: 2012-02-22 |


| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------

**********************************************************************
* *
* Warning: this is a prerelease version, and it may be unstable. *
* *
**********************************************************************

sage:
sage:
Exiting Sage (CPU time 0m0.03s, Wall time 0m7.44s).
johan@johan-laptop:~/Applications$ export
PATH=$PATH:/home/johan/Applications
johan@johan-laptop:~/Applications$ sage
----------------------------------------------------------------------
| Sage Version 5.0.beta5, Release Date: 2012-02-22 |


| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------

**********************************************************************
* *
* Warning: this is a prerelease version, and it may be unstable. *
* *
**********************************************************************
sage:
Exiting Sage (CPU time 0m0.03s, Wall time 0m5.17s).
johan@johan-laptop:~/Applications$


Hope it helps.


/ johan

Reply all
Reply to author
Forward
0 new messages