CentOS 7 安装带有 GUI 的 Octave 4.0.2(OpenGL 支持)

CentOS 7 install Octave 4.0.2 with GUI (OpenGL support)

我正在尝试从 CentOS 7 中的源代码安装 Octave 4,但我收到了警告消息:

configure: WARNING: OpenGL libs (GL and GLU) not found.  Native graphics will be disabled.
configure: WARNING: OpenGL libs (GL and GLU) not found -- disabling GUI
configure: WARNING: 
configure: WARNING: I didn't find the necessary libraries to compile native
configure: WARNING: graphics.  It isn't necessary to have native graphics,
configure: WARNING: but you will need to have gnuplot installed or you won't
configure: WARNING: be able to use any of Octave's plotting commands
configure: WARNING: 
configure: 
configure: NOTE: Libraries or auxiliary programs may be skipped if they are
configure: NOTE: not found OR if they are missing required features on your
configure: NOTE: system.

我已经检查过这个 QUESTION 但它没有帮助。

我也做了yum install libqt4-opengl-dev但是出现了错误No package libqt4-opengl-dev available.

我有 mesa-libGL 和 mesa-libGL-devel,但配置似乎无法获取这些库。

编辑:回答我自己的问题 请参阅问题下方的评论。

我知道这是一个老问题,但我想保留它,以防有人仍在寻找安装 Octave 的简单方法 4.x。 安装 Octave 4 最简单的方法是使用 Flatpack。 CentOS 7默认安装。

flatpak install flathub org.octave.Octave
flatpak run org.octave.Octave

如果您使用的是 Red Hat,则需要先安装 flatpak:

sudo yum install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo