Goland启动闪退

/Applications/GoLand.app/Contents/MacOS/goland ; exit;
➜  ~ /Applications/GoLand.app/Contents/MacOS/goland ; exit;
2022-12-27 16:38:39.477 goland[6625:69821] allVms required 1.8*,1.8+
2022-12-27 16:38:39.478 goland[6625:69826] Cannot load JVM bundle: Error Domain=NSCocoaErrorDomain Code=3585 "dlopen_preflight(/Applications/GoLand.app/Contents/jbr/Contents/MacOS/libjli.dylib) => false, tried: '/Applications/GoLand.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/GoLand.app/Contents/jbr/Contents/MacOS/libjli.dylib' (no such file), '/Applications/GoLand.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))" UserInfo={NSLocalizedFailureReason=The bundle doesn’t contain a version for the current architecture., NSLocalizedRecoverySuggestion=Try installing a universal version of the bundle., NSFilePath=/Applications/GoLand.app/Contents/jbr/Contents/MacOS/libjli.dylib, NSDebugDescription=dlopen_preflight(/Applications/GoLand.app/Contents/jbr/Contents/MacOS/libjli.dylib) => false, tried: '/Applications/GoLand.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/GoLand.app/Contents/jbr/Contents/MacOS/libjli.dylib' (no such file), '/Applications/GoLand.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), NSBundlePath=/Applications/GoLand.app/Contents/jbr, NSLocalizedDescription=The bundle “JBR-17.0.5+1-653.14-jcef 17.0.5” couldn’t be loaded because it doesn’t contain a version for the current architecture.}
rosetta_has_been_previously_installed: true
2022-12-27 16:38:39.481 goland[6625:69826] Retrying as x86_64...
2022-12-27 16:38:39.509 goland[6625:69829] allVms required 1.8*,1.8+
2022-12-27 16:38:39.512 goland[6625:69841] Current Directory: /Users/dairuiquan
2022-12-27 16:38:39.512 goland[6625:69841] parseVMOptions: GOLAND_VM_OPTIONS = /Users/dairuiquan/Desktop/drq/百度网盘/muke/激活补丁/jetbra/vmoptions/goland.vmoptions
2022-12-27 16:38:39.515 goland[6625:69841] parseVMOptions: platform=-1 user=-1 file=(null)
2022-12-27 16:38:39.605 goland[6625:69841] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007ff809eb7cc3 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007ff809a0610a objc_exception_throw + 48
    2   CoreFoundation                      0x00007ff809edfea6 _CFBundleGetValueForInfoKey + 0
    3   AppKit                              0x00007ff80ceeb584 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 307
    4   AppKit                              0x00007ff80ced8353 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1247
    5   AppKit                              0x00007ff80d073072 -[NSPanel _initContent:styleMask:backing:defer:contentView:] + 50
    6   AppKit                              0x00007ff80ced7e6d -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
    7   AppKit                              0x00007ff80d07302b -[NSPanel initWithContentRect:styleMask:backing:defer:] + 59
    8   AppKit                              0x00007ff80ced638b -[NSWindowTemplate nibInstantiate] + 354
    9   AppKit                              0x00007ff80cea4822 -[NSIBObjectData instantiateObject:] + 222
    10  AppKit                              0x00007ff80cea3f94 -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 476
    11  AppKit                              0x00007ff80ce98a6f loadNib + 420
    12  AppKit                              0x00007ff80ce97e57 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 737
    13  AppKit                              0x00007ff80ce97a81 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 201
    14  AppKit                              0x00007ff80d1eac60 -[NSAlert init] + 101
    15  goland                              0x00000001025f7a58 -[Launcher buildArgsFor:] + 1416
    16  goland                              0x00000001025f7f44 -[Launcher launch] + 340
    17  Foundation                          0x00007ff80abcc82c __NSThread__start__ + 1009
    18  libsystem_pthread.dylib             0x00007ff809d65259 _pthread_start + 125
    19  libsystem_pthread.dylib             0x00007ff809d60c7b thread_start + 15
)
libc++abi: terminating with uncaught exception of type NSException
[1]    6625 abort      /Applications/GoLand.app/Contents/MacOS/goland

Saving session...completed.

之前安装了网上下载的版本,最新版本一直闪退

set和env 、getenv查看,无故多了很多环境变量,类似

GOLAND_VM_OPTIONS、IDEA_VM_OPTIONS等

使用unset清理后, 重启iterm2, 环境变量又出现了,始终找不到哪里设置的环境变量

网上找了很多方法,寻找是哪里设置该环境变量,无果,无奈,只能使用搜索大法

在用户当前目录下执行, ➜ ~ grep -r GOLAND_VM_OPTIONS ./*

终于搜到了,是在这个文件里面设置了环境变量

~/Library/LaunchAgents/jetbrains.vmoptions.plist

网上搜了下,这是系统启动后,自动加载的一些配置

删除该文件,重启电脑,goland可以正常打开了

关于LaunchAgents可参考文章

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 之前安装了网上下载的版本,最新版本一直闪退 set和env 、getenv查看,无故多了很多环境变量,类似 GOL...
    belm阅读 2,207评论 1 1
  • 1、建议去go语言中文网下载,网址:https://studygolang.com/dl,下图是下载页面及包介绍 ...
    落雨_a363阅读 4,115评论 0 0
  • 首先安装Go语言环境: 打开网站Go语言官方,根据自己的操作系统选取合适的安装,比如我是Windows 64位,我...
    焜俞阅读 582评论 0 1
  • 本来打算使用 VSCode 进行 go 开发、学习的 但各种插件需要翻墙安装 翻墙了,但部分插件来自 go 官网依...
    山书山海阅读 1,620评论 0 1
  • 这篇是自己学习所用,请谨慎观看,具体内容可看下面博客:Android启动流程简析[https://www.jian...
    QGv阅读 1,357评论 0 0