简体   繁体   English

在Centos 7中编译八度音阶时出错

[英]Error compiling Octave in Centos 7

Here is a list of the steps that I did in order to attempt to install Octave 4.2.1 in Centos 7 (repo version is 3.8.2 which is really old now) 这是我为尝试在Centos 7中安装Octave 4.2.1所做的步骤的列表(存储库版本为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

It failed with this error: 它因以下错误而失败:

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>

Has anyone come up with this problem and has some workaround or solution? 有没有人想出这个问题,并有解决方法或解决方案? Thanks 谢谢

QtWidgets/QAction is specific to Qt5, and it seems that when you executed yum-builddep -y octave it got dependencies for Qt4. QtWidgets/QAction特定于Qt5,似乎在执行yum-builddep -y octave它获得了Qt4的依赖关系。 Configure octave with the option --with-qt=4 . 使用--with-qt=4选项配置八度。 Another option is to install qt5 libraries and its devel files, configure --with-qt=5 , and make. 另一个选择是安装qt5库及其devel文件,配置--with-qt=5并进行。

Or you can just use Flatpack to install the latest version of Octave without any hassle: 或者,您可以使用Flatpack轻松安装最新版本的Octave:

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

CentOS 7 already comes with built-in Flatpack app, but your distro doesn't have one you can install it: CentOS 7已经内置了Flatpack应用程序,但是您的发行版没有一个可以安装的应用程序:

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM