无法启动Intellij Idea CE:在库路径上找不到代理库yjpagent64

时间:2019-05-20 12:21:32

标签: intellij-idea

我在MacBook Pro上启动Intellij Idea CE时遇到问题。错误消息是:

…/Contents/bin  /Applications/IntelliJ\ IDEA\ CE.app/Contents/MacOS/idea
2019-05-20 22:12:32.647 idea[5029:86633] allVms required 1.8*,1.8+
2019-05-20 22:12:32.651 idea[5029:86638] Value of IDEA_VM_OPTIONS is (null)
2019-05-20 22:12:32.652 idea[5029:86638] Processing VMOptions file at /Users/pengxiao/Library/Preferences/IdeaIC2019.1/idea.vmoptions
2019-05-20 22:12:32.652 idea[5029:86638] Done
-Xms128m
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error occurred during initialization of VM
Could not find agent library yjpagent on the library path, with error: dlopen(libyjpagent.dylib, 1): image not found

1 个答案:

答案 0 :(得分:0)

我终于发现原因是 idea.vmoptions 文件。该文件的内容为:

 …/Contents/bin $ cat ~/Library/Preferences/IdeaIC2019.1/idea.vmoptions
-Xms128m
-Xmx750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:MaxJavaStackTraceDepth=10000
-Xverify:none

-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
-Xbootclasspath/a:../lib/boot.jar
-agentlib:yjpagent=probe_disable=*,disablealloc,disabletracing,onlylocal,disableexceptiontelemetry,delay=10000,sessionname=IntelliJIdea2017.2%

我认为是导致该问题的文件的最后一行。删除文件后,我可以毫无问题地启动Idea。