英文:
IntelliJ IDEA compilation fails with "java.net.BindException: Can't assign requested address" on macOS
问题
无论运行什么程序,我都会收到这个错误提示。
> 异常构建过程终止:nice -n 10
> /Library/Java/JavaVirtualMachines/zulu-19.jdk/Contents/Home/bin/java
> -Xmx700m -Djava.awt.headless=true --add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens
>
> ...
>
> 错误连接到127.0.0.1:60033;原因:无法分配请求的
> 地址:/127.0.0.1:60033
> io.netty.channel.AbstractChannel$AnnotatedSocketException: 无法
> 分配请求的地址:/127.0.0.1:60033 由于:
> java.net.BindException: 无法分配请求的地址 at
> java.base/sun.nio.ch.Net.connect0(Native Method) at
> java.base/sun.nio.ch.Net.connect(Net.java:483) at
> java.base/sun.nio.ch.Net.connect(Net.java:472)
尝试安装其他不同的JDK,但没有成功
英文:
I get this error note no matter what program Im trying to run
> Abnormal build process termination: nice -n 10
> /Library/Java/JavaVirtualMachines/zulu-19.jdk/Contents/Home/bin/java
> -Xmx700m -Djava.awt.headless=true --add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens
>
> ...
>
> Error connecting to 127.0.0.1:60033; reason: Can't assign requested
> address: /127.0.0.1:60033
> io.netty.channel.AbstractChannel$AnnotatedSocketException: Can't
> assign requested address: /127.0.0.1:60033 Caused by:
> java.net.BindException: Can't assign requested address at
> java.base/sun.nio.ch.Net.connect0(Native Method) at
> java.base/sun.nio.ch.Net.connect(Net.java:483) at
> java.base/sun.nio.ch.Net.connect(Net.java:472)
tried installing other different jdks with no success:(
答案1
得分: 1
参见这个答案以获取解决方案。
这条命令应该有所帮助:
sudo ifconfig lo0 alias 127.0.0.1
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论