如何修复尝试安装 portmidi 时出现的 cmake 错误?

如何修复尝试安装 portmidi 时出现的 cmake 错误?

我正在按照说明在 ubuntu 18.04 上安装 portmidi

README_LINUX.txt for PortMidi
Roger Dannenberg
14 Oct 2009

To make PortMidi, you need cmake and the Java SDK.
Go back up to the portmidi directory and type:

ccmake .

Type 'c' (configure) and then 'g' (generate). You may have
to manually set JAVA_INCLUDE_PATH and JAVA_JVM_LIBRARY
by typing 't' (toggle to advanced mode) and using the 
editor to change the fields. You can find possible values
for JAVA_INCLUDE_PATH by typing "locate jni.h", and for
JAVA_JVM_LIBRARY by typing locate libjvm".

You also need JAVA_INCLUDE_PATH2, but this will normally
be set automatically after you set JAVA_INCLUDE_PATH and
run "configure" (type "c" to ccmake). Normally,
JAVA_INCLUDE_PATH2 is the linux subdirectory within
JAVA_INCLUDE_PATH.

但我收到错误

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
 Please set them or make sure they are set and tested correctly in the CMake
 files:
 JAVA_INCLUDE_PATH (ADVANCED)

我尝试使用以下方式安装 Java,sudo apt install default-jre并使用以下方式设置我的 JAVA_HOME 变量export JAVA_HOME=/usr/bin/java

但我仍然收到这个错误

相关内容