我有生成以下错误的python代码:
objc[36554]: Class TKApplication is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.
objc[36554]: Class TKMenu is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.
objc[36554]: Class TKContentView is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.
objc[36554]: Class TKWindow is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.我的一些Tk扩展库在编译时链接到/System/Library/Frameworks而不是/Library/Frameworks,我知道install_name_tool工具可以将二进制文件重新链接到正确的框架,但我到底需要在终端中输入什么才能解决这个问题?
发布于 2013-06-27 17:05:51
我不完全知道如何重新链接库,但我找到了这篇博客文章。这也解决了同样的问题。在这种情况下,一切都是由于ActiveTcl扰乱了已经安装的系统框架。
他最终简单地删除了非系统版本。这是一个极端的解决方案,但它可能会奏效。
cd /Library/Frameworks
rm -r Tk.framework
rm -r Tcl.framework您也可以先将框架移到其他地方进行测试,如果您破坏了某些东西,可以在以后恢复它们。
http://michaelwelburn.com/2013/06/07/python-error-conflicting-tk-libraries-and-activetcl/
发布于 2014-05-19 13:34:34
我不认为简单地删除框架是处理这个问题的最好方法。如果这些框架确实来自ActiveTcl安装,则可能需要清理其他文件和链接。ActiveState提供了一个uninstall脚本来清理所有东西;在ActiveTcl User Guide中指定了在哪里找到它以及如何使用它。请注意,脚本位置取决于OS X版本。
如果你已经删除了框架和卸载脚本,你可能需要在/usr/local/bin中查找ActiveTcl放在那里的任何可执行文件(或者到可执行文件的陈旧链接)(例如,wish、tclsh和tkcon)。要查找链接到已删除框架位置的任何内容,您可以使用类似ls -l | grep Tcl或ls -l | grep Tk的内容(但请确保您发现并打算删除的任何链接都指向第三方/Library位置,而不是/系统/库位置)。
https://stackoverflow.com/questions/17327407
复制相似问题