简体   繁体   English

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

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

After running :observer.start in iex I received the follwing messages.在 iex 中运行:observer.start后,我收到了以下消息。 I tried uninstalling and reinstalling both Elixir and Homebrew but to no avail.我尝试卸载并重新安装 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

I uninstall the wxmac:我卸载 wxmac:

brew uninstall wxmac

and reinstalled to build wxmac locally instead of installing already built binary using the extra flag:并重新安装以在本地构建 wxmac,而不是使用额外标志安装已构建的二进制文件:

brew install --build-from-source wxmac

Update the plugin erlang for asdf:为 asdf 更新插件 erlang:

asdf plugin-update erlang

and then install the last version of the Erlang:然后安装Erlang的最新版本:

asdf install erlang latest

and now when I try to run the :observer.start() it work's!现在,当我尝试运行:observer.start()时,它可以工作了!

Observer uses WXwidgets to render the window and the controls on your platform. Observer 使用WXwidgets渲染 window 和平台上的控件。 As the error suggests you have 2 installations, not sure how you handle such errors on mac but I suppose deleting one of the versions will solve the error.由于错误表明您有 2 个安装,不确定如何在 mac 上处理此类错误,但我想删除其中一个版本将解决错误。

To make your life easier, there is now a new option to run observer in browser called Phoenix Live Dashboard that does not require any local renderer dependencies installed.为了让您的生活更轻松,现在有一个新选项可以在名为Phoenix Live Dashboard的浏览器中运行观察者,它不需要安装任何本地渲染器依赖项。

Pass extra flag to brew install to build wxmac locally instead of installing already built binary.( There seems to be a bug in bigsur wxmac bottle ).将额外的标志传递给brew install以在本地构建 wxmac,而不是安装已经构建的二进制文件。( bigsur wxmac 瓶中似乎有一个错误)。 Elixir has dependency on Erlang which in turn has dependency on wxmac to show observer window. Elixir 依赖于 Erlang,而后者又依赖于 wxmac 以显示观察者 window。 So execute this first before installing erlang or elixir.所以在安装 erlang 或 elixir 之前先执行这个。

brew install --build-from-source wxmac

It seems like all of the dylib files are exact duplicates of each other in /usr/local/opt/wxmac/lib .似乎所有 dylib 文件在/usr/local/opt/wxmac/lib中彼此完全相同。 This might be a problem with how the dylibs are installed for wxmac but I don't have the patience to follow up on that right now.这可能是如何为 wxmac 安装 dylib 的问题,但我现在没有耐心跟进。 Perhaps someone with more knowledge than I knows how to fix the wxmac brew formula?也许比我了解更多的人知道如何修复 wxmac brew 公式?

It's a bit of a hack but I found that manually symlinking all of the dylib's in the directory fixed the problem for me.这有点小技巧,但我发现手动对目录中的所有 dylib 进行符号链接可以解决我的问题。 For example,例如,

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