How to use update-alternatives to update my sage command

32 Views Asked by At

There is a /usr/bin/sage file in my PC, and I can use sage to launch sage9.0 normally: enter image description here

It is not a soft link, because readlink /usr/bin/sage return nothing, and Now, I compiled a new version of sage10.0 from the source code, and

#  ll /usr/bin/sage

-rwxr-xr-x 1 root root 26791 Feb 8 2020 /usr/bin/sage*

I can use /opt/sage-10.0/sage to launch it: enter image description here

Now I want to use update-alternatives to manage my two commands(/usr/bin/sage, /opt/sage-10.0/sage), but:

# update-alternatives --install /usr/bin/sage sage /opt/sage-10.0/sage 100

warning: not replacing /usr/bin/sage with a link

# update-alternatives --install /usr/bin/sage sage /usr/bin/sage 200

<link> and <path> can't be the same

How should I deal with these two errors?

0

There are 0 best solutions below