Error compiling Octave in Centos 7 - qt

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)
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. Configure octave with the option --with-qt=4. Another option is to install qt5 libraries and its devel files, configure --with-qt=5, and make.

Or you can just use Flatpack to install the latest version of Octave without any hassle:
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:
sudo yum install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Official website:
https://flatpak.org/setup/

Related

Cant run qgis version Qt_5_PRIVATE_API not defined

I am running Ubuntu 18.04 and I cant seem to get qgis to run anymore. The error I get is:
/usr/bin/qgis.bin: relocation error: /usr/lib/x86_64-linux-gnu/libQt5QuickWidgets.so.5: symbol _ZN15QQmlMemoryScope5stateE version Qt_5_PRIVATE_API not defined in file libQt5Qml.so.5 with link time reference
my qmake version is:
QMake version 3.1
Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu
I have tried to link to qt5 but that did not change anything.
sudo ln -snf ../../../../share/qtchooser/qt5-x86_64-linux-gnu.conf default.conf
You need to uninstall QGIS and reinstall with the latest stable release. Using sudo apt-get install qgis* python3-qgis* to install is not precisely the best method because of the wildcard. The official instructions suggest using: sudo apt install qgis qgis-plugin-grass.
The instructions for best installation procedure on Ubuntu for LTS releases is posted here.

How to install newer version of R on Amazon Linux 2

For whatever reason, Amazon moved R to the so-called "Extras Library" so you can't install R using sudo yum install -y R anymore. Instead, you have to do sudo amazon-linux-extras install R3.4. As a result, I can only install R 3.4.3 when the newest stable release is 3.6.1, and so many R libraries can't even be installed because the version is too low. Is there any good and clean way to install the latest version of R and skip Amazon's package manager? Thanks!
Use amazon-linux-extras which installs R4.0.2:
amazon-linux-extras install R4
You may need root:
sudo amazon-linux-extras install R4
I've tried setting up R 3.6.x on a docker container that uses the amazonlinux image. My approach was to get the R source file from the below link and install from source
cd /tmp/
wget https://cloud.r-project.org/src/base/R-3/R-3.6.3.tar.gz
tar -zxf R-3.6.3.tar.gz
cd /tmp/R-3.6.3
./configure --without-libtiff --without-lapack --without-ICU --disable-R-profiling --disable-nls
make
make install
you will need to yum install some dependencies, like 'make', which doesn't seem to come with aws amazonlinux docker image (which i think mirrors the EC2 instance AMI image you are referring to).
The above kind of worked for me in that i had a working R3.6 installation, but it didnt allow me use it with rshiny server, so i'm reverting to the shipped 3.4.3 version.
tl;dr: you'll probably have to manually download the source files and install the desired R version from source, and throw in some build dependencies as well.
Try this on Amazon Linux 2
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install R
Amazon Linux 2 Image contains extras library that can be used as well. Follow the guide here.
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-install-extras-library-software/
sudo amazon-linux-extras enable R3.4
sudo yum clean metadata && sudo yum install R3.4

Installing SaltStack on RHEL 7?

I need help on installing saltstack on RHEL 7.
RHEL 7 server is from AWS Amazon.
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)
I'm getting an error during installation:
$ wget -O - http://bootstrap.saltstack.org | sudo sh
2014-08-04 09:41:45 (932 KB/s) - written to stdout [177548/177548]
INFO: Found function install_red_hat_enterprise_linux_7_stable_deps
INFO: Found function install_red_hat_enterprise_linux_stable
INFO: Found function install_red_hat_enterprise_linux_stable_post
INFO: Found function install_red_hat_enterprise_linux_restart_daemons
INFO: Found function daemons_running
INFO: Running install_red_hat_enterprise_linux_7_stable_deps()
ERROR: Stable version is not available on RHEL 7 Beta/RC. Please set installation type to git.
ERROR: Failed to run install_red_hat_enterprise_linux_7_stable_deps()!!!
Is this version of RHEL 7 not supported for saltstack?
Run the following commands to install from the latest develop branch:
curl -o install_salt.sh -L https://bootstrap.saltstack.com
sudo sh install_salt.sh -M git develop
Remove the -M from the command above if you don't want to install a salt-master and only want to install salt-minion.
I have a similar problem, I tried to install it from epel 7 beta, but there's another problem, see https://bugzilla.redhat.com/show_bug.cgi?id=1127348. Finally I was able to install it by combining pip and yum. I don't have the exact sequence of commands, but sth. like this should work:
yum install --skip-broken salt python-pip
pip install jinja2
I have tried installing SaltStack on CentOS 7 , which should be similar to Redhat 7, and you could try it, hope it works for you:
**[updated]** http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
and then you could
yum install -y salt-master
or
yum install -y install salt-minion
to install it.
You need to enable the rhel-7-server-optional-rpms repo in subscription-manager.

Qt Creator : QtGui include error

I wanted to learn Qt and so downloaded Qt library(5.0) and Qt creator for windows. There, I was not able to access QNetworkAccessManager..it gave an error when I included QNetworkAccessManager
I wasn't able to figure out the reason of the error and I was dual-booting with Ubuntu. So I downloaded Qt for Ubuntu and started using it, but, this time it is giving an error when I am including QtGui.
The errors are:
/home/shaarad/Qt5.0.0/5.0.0/gcc_64/include/QtGui/qopenglcontext.h:60:
In file included from ../../../Qt5.0.0/5.0.0/gcc_64/include/QtGui/qopenglcontext.h:60:0,
/home/shaarad/Qt5.0.0/5.0.0/gcc_64/include/QtGui/QtGui:33:
from ../../../Qt5.0.0/5.0.0/gcc_64/include/QtGui/QtGui:33,
/home/shaarad/Documents/JIGS/JIGS-FILE-SHARING-master/MainFrame.cpp:5:
from ../JIGS-FILE-SHARING-master/MainFrame.cpp:5:
/home/shaarad/Qt5.0.0/5.0.0/gcc_64/include/QtGui/qopengl.h:98:
error: GL/gl.h: No such file or directory
Any workaround will be helpful, thanks a lot! :)
sudo apt-get install mesa-common-dev
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
Those two provided the solution.
You are missing the OpenGL include files. Install the mesa-common-dev package:
# apt-get install mesa-common-dev
This includes the /usr/include/GL directory.
Install also:
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
I fixed it by installing qt5-default:
sudo apt install qt5-default
For Fedora, you'll require:
sudo dnf install mesa-libGL-devel

error installing qt-sdk on linux

i have ubuntu-10.10 desktop version i installed following packages using apt-get install
libglib2.0-dev
libSM-dev
libxrender-dev
libfontconfig1-dev
libxext-dev
libgl1-mesa-dev
libglu-meas-dev
i downloaded qt-sdk-linux-x86-opensource-2010.05.1.bin
changed permission of bin file
chmod u+x qt-sdk-linux-x86-opensource-2010.05.1.bin
./qt-sdk-linux-x86-opensource-2010.05.1.bin
it gives me an error like not able to create symbolic link to libQtCore-4.7.0 and installation aborts.
can any one suggest me what is going wrong and how can i over come this issue
You can just install qt-sdk package from Ubuntu repositories, if you must install by hand, try running it with sudo;
sudo ./qt-sdk-linux-x86-opensource-2010.05.1.bin

Resources