Ask Your Question
1

Sage symlink not working

asked 2016-08-30 14:53:03 +0100

enanae gravatar image

updated 2017-01-08 12:23:08 +0100

FrédéricC gravatar image

I've tried to create a symlink for sage to use in my OS X terminal, using the command

sudo ln -s /Applications/SageMath-7.3.app/sage/sage /usr/local/bin/sage

I got an alias file in my bin-folder, but when I try to open it all I get is this message

"The operation can’t be completed because the original item for “sage” can’t be found."

When I type in just the path /Applications/SageMath-7.3.app/sage/sage in the terminal, sage opens just fine.

Can somebody tell me what I'm doing wrong? I'm not very accustomed to working in the terminal.

edit retag flag offensive close merge delete

Comments

1

Possibly permissions issue? For myself, I usually put the path for sage in my .profile, e.g. a line like export PATH=$PATH:'/Applications/SageMath-7.3.app/sage/' might work for you.

kcrisman gravatar imagekcrisman ( 2016-08-30 15:26:13 +0100 )edit
1

After completing the ln command, what does command -v sage tell you?

John Palmieri gravatar imageJohn Palmieri ( 2016-08-31 16:16:11 +0100 )edit

Try this

$ A='/Applications/SageMath-7.3.app/Contents/Resources/sage/sage'
$ B='/usr/local/bin/sage'
$ ln -sf $A $B
slelievre gravatar imageslelievre ( 2016-09-05 15:16:27 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-08-08 12:52:47 +0100

You are adding a relative path while creating the symlink. So if you go to /usr/local/bin and do file sage, you'll see that the link is broken. Unlink the created link, (in Linux, unlink sage) then repeat the command but with the complete path. eg: ln -s ~/sage9.1/sage /user/local/bin/sage This worked for me.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2016-08-30 14:53:03 +0100

Seen: 875 times

Last updated: Sep 05 '16