在Centos 7中编译Octave时出错

时间:2017-06-06 10:23:16

标签: qt octave

以下列出了为尝试在Centos 7中安装Octave 4.2.1所做的步骤(repo版本为3.8.2,现在已经很老了)

1)   yum update
2)   yum-builddep -y octave
3)   yum -y install qt-devel mercurial gcc-c++ lapack-devel libtool
4)   yum -y install epstool transfig pstoedit qscintilla-devel 

(NOTE: First problem was right here as there is NO pstoedit in Centos 7, as far as I know)

5) sudo yum install bzip2-devel atlas-devel libsndfile-devel portaudio-devel GraphicsMagick-c++-devel
6)  ln -s /usr/lib64/atlas/libtatlas.so /usr/lib64/libatlas.so (One of the tutorials recommended doing this to fix a place where a library was being searched for or something like that. It seemed harmless enough)
7) wget ftp://ftp.gnu.org/gnu/octave/octave-4.2.1.tar.gz 
8) tar-xvf octave-4.2.1.tar.lz
9) cd octave-4.2.1
10) export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
11) ./configure --prefix=/usr/local/octave/versions/4.2.1
12)  make -j4

此错误失败:

In file included from libgui/src/settings-dialog.cc:31:0:
libgui/src/ui-settings-dialog.h:13:29: fatal error: QtWidgets/QAction: No such file or directory
 #include <QtWidgets/QAction>

有没有人提出这个问题并有一些解决方法或解决方案?感谢

2 个答案:

答案 0 :(得分:3)

QtWidgets/QAction特定于Qt5,似乎当你执行yum-builddep -y octave时,它获得了Qt4的依赖关系。使用选项--with-qt=4配置八度音程。另一个选择是安装qt5库及其开发文件,配置--with-qt=5和make。

答案 1 :(得分:0)

或者您也可以使用Flatpack轻松安装最新版本的Octave:

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

CentOS 7已经内置了Flatpack应用程序,但是您的发行版没有一个可以安装的应用程序:

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

官方网站: https://flatpak.org/setup/