IntelliJ IDEA compilation fails with "java.net.BindException: Can't assign requested address" on macOS

huangapple go评论67阅读模式
英文:

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,但没有成功 IntelliJ IDEA compilation fails with "java.net.BindException: Can't assign requested address" on macOS

英文:

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
英文:

See this answer for the solution.

This command should help:

sudo ifconfig lo0 alias 127.0.0.1

huangapple
  • 本文由 发表于 2023年2月8日 23:09:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/75387757.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定