First time here? Check out the FAQ!

Ask Your Question
1

Sage symlink not working

asked 8 years ago

enanae gravatar image

updated 8 years ago

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.

Preview: (hide)

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 ( 8 years ago )
1

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

John Palmieri gravatar imageJohn Palmieri ( 8 years ago )

Try this

$ A='/Applications/SageMath-7.3.app/Contents/Resources/sage/sage'
$ B='/usr/local/bin/sage'
$ ln -sf $A $B
slelievre gravatar imageslelievre ( 8 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 3 years ago

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.

Preview: (hide)
link

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: 8 years ago

Seen: 926 times

Last updated: Sep 05 '16