Xcode启动失败,提示"Loading a plug-in failed The plug-in or one of its prerequisite plug-ins may be missin

来源:互联网 发布:python 数据库框架 编辑:程序博客网 时间:2024/04/30 14:03

查看错误日志

如何查看

注:正常启动时弹出错误”Loading a plug-in failed The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled” ,可以使用下述命令行来启动程序,则可以看到错误日志

$/Applications/Xcode.app/Contents/MacOS/Xcode

错误

查看错误日志可以看到 Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python,说明错误是出现在python

原因

  • 用户自己更新了python,现在的python版本不为2.7,可通过在终端输入python确认
  • 用户删除了系统中自带的2.7,重新安装了python2.7,则会缺少很多第三方的lib,而导致加载不了Library

解决

注:本方法会删除所有已安装的python环境,读者可以选择性删除,导入系统自带的python包,其中系统自带的python包含一系列第三方库

删除已安装python

通过brew安装的python

brew uninstall python

通过pkg安装的包


sudo rm -rf /Library/Frameworks/Python.framework/Versions/*

系统中的软连接


sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/*
sudo rm -f /usr/bin/python

导入系统的python

下载地址
1. 解压python包得到目录2.7
2. 复制目录到/System/Library/Frameworks/Python.framework/Versions/
3.ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 /usr/bin/python

1 0
原创粉丝点击