繁体   English   中英

wxmac elixir 尝试运行时出错:iex 中的observer.start

[英]wxmac elixir error when trying to run :observer.start in iex

在 iex 中运行:observer.start后,我收到了以下消息。 我尝试卸载并重新安装 Elixir 和 Homebrew 但无济于事。

objc[58977]: Class wxNSProgressIndicator is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x1f5e9fc0) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1ef61fc0). One of the two will be used. Which one is undefined.

objc[58977]: Class wxNSTableDataSource is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x1f5ea038) and /usr/local/opt/wxmac/lib/libwx_osxzsh: segmentation fault

我卸载 wxmac:

brew uninstall wxmac

并重新安装以在本地构建 wxmac,而不是使用额外标志安装已构建的二进制文件:

brew install --build-from-source wxmac

为 asdf 更新插件 erlang:

asdf plugin-update erlang

然后安装Erlang的最新版本:

asdf install erlang latest

现在,当我尝试运行:observer.start()时,它可以工作了!

Observer 使用WXwidgets渲染 window 和平台上的控件。 由于错误表明您有 2 个安装,不确定如何在 mac 上处理此类错误,但我想删除其中一个版本将解决错误。

为了让您的生活更轻松,现在有一个新选项可以在名为Phoenix Live Dashboard的浏览器中运行观察者,它不需要安装任何本地渲染器依赖项。

将额外的标志传递给brew install以在本地构建 wxmac,而不是安装已经构建的二进制文件。( bigsur wxmac 瓶中似乎有一个错误)。 Elixir 依赖于 Erlang,而后者又依赖于 wxmac 以显示观察者 window。 所以在安装 erlang 或 elixir 之前先执行这个。

brew install --build-from-source wxmac

似乎所有 dylib 文件在/usr/local/opt/wxmac/lib中彼此完全相同。 这可能是如何为 wxmac 安装 dylib 的问题,但我现在没有耐心跟进。 也许比我了解更多的人知道如何修复 wxmac brew 公式?

这有点小技巧,但我发现手动对目录中的所有 dylib 进行符号链接可以解决我的问题。 例如,

cd /usr/local/opt/wxmac/lib
rm libwx_osx_cocoau_core-3.0.dylib
ln -s libwx_osx_cocoau_core-3.0.0.5.0.dylib libwx_osx_cocoau_core-3.0.dylib
# repeat for any/all libs that are a problem (I did all of them)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM