Safe way to remove a symbolic link to an non-existing directory (for the python binary)

浪子不回头ぞ 提交于 2019-12-05 21:30:06

you can simply remove the link with rm :

rm /usr/bin/python

You remove a symlink the same way you remove a regular file, even if it's a symlink to a directory. (If the target doesn't exist, it's a moot point whether it was intended to be a directory or a file.)

kesten

this worked for me. Although I originally created the symlink following a blender tutorial http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux/Troubleshooting#Setting_Python_Path_in_SCons

using this command:

sudo update-alternatives --install /usr/bin/python python /your/path/to/python3.2 1

(see man page for update-alternatives for info. Terminal>man update-alternatives)

I'm curious to know how badly I've messed things up for the update-alternatives system of managing different versions of same-named software. For instance, i think scons runs on python2.7 while blender builds internally with python3.2. Will things resolve correctly still? We shall see...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!