1

So I am trying to migrate to Alpine Linux; however, I cannot seem to install two IDEs, Pycharm and IntelliJ IDEA.

They are both throwing me the same error whenever I attempt to run either pycharm.sh or idea.sh, respectively; both are of the form

bin/pycharm.sh: line 214: /home/varun/Applications/pycharm/jbr/bin/java: not found
bin/idea.sh: line 216: /home/varun/Applications/intellij-idea/jbr/bin/java: No such file or directory

I am utterly baffled, because both files exist and have correct permissions on them, which I verified with ls -l ./jbr/bin while in each application's root directory. Running pycharm.sh or idea.sh with sudo or even as root had absolutely no effect. They also refer to the same file in each application folder, so I am just completely confused as to what is going on. How do I start up IntelliJ IDEA and Pycharm on my system? I am using oh-my-zsh for my shell by the way, if that is important.

1 Answer 1

1

This may be caused by an incompatibility between the Standard C library used by Alpine (musl) and the one expected by the Java JDK bundled with PyCharm and IntelliJ (glibc) .

The confusing "not found" and "no such file or directory" messages are probably coming from the linker, trying to tell you that it is unable to link the java executable with the Standard C libraries it was compiled against. You can verify this by running ldd on the java binary and seeing if it reports unresolved links.

If this indeed is the cause of your problem, you need to install glibc packages on Alpine. The AdoptOpenJDK project publishes Dockerfiles for Alpine that may illustrate what you need to configure your own system (or at least have a container as a testbed): https://github.com/AdoptOpenJDK/openjdk-docker

Their main page has native (non-docker) build configs for Alpine, but I'm not sure that's what you need, as in your case you are trying to run an already built java binary. But in case it's useful: https://github.com/AdoptOpenJDK

For more background, see

1
  • Thanks for sharing, and decoding the confusing "no such file or directory" error!
    – Rana Ian
    Apr 3, 2021 at 22:28

You must log in to answer this question.