cmake not working, could not exec qmake - cmake

I am using Ubuntu 14.04. I'm trying to install a program which requires cmake. When I run cmake src/ I get:
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
What am I doing wrong?

Does the trick:
sudo apt-get install qt4-qmake
You do not need to install half a gigabyte of qt sdk!

I read on another post that the problem has something to do with CMake not being able to find Qt4 qmake.
However in my case, it was simply a matter of not having qt4-qmake. This solved it (but weighs a heavy 440MB):
sudo apt-get install qt-sdk

For newer versions of Ubuntu, if you have only installed version 5 of the Qt Framework, you may get this error. If you want to use Qt version 5 by default, then you should run the following command to fix the error:
sudo apt install qt5-default

You need the qt dependences:
sudo apt-get install qt4-qmake libqt4-dev

as it says in docs: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#debian--ubuntu
sudo apt-get update
sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
works for me in Ubuntu 18.04

You can use QtCreator to compile the cmake project too. This is only advantageous over the accepted answer if you already have QtCreator installed, I notice you are using a qmake project so this might be likely.
The main advantage of this is that qt creator will be configured to use the qmake tool without the need to install the command line configured version of qmake.
Incidentally, I get this error if I try to run the qmake executable bundled with QtCreator on the command line.

Related

How do I install an older ethtool version on a machine?

I need to test if some firmware is compatible with older ethtool versions.
The machine I am using currently have ethtool version 5.16, but I need to install ethtool version 5.13
I got the compressed file from https://mirrors.edge.kernel.org/pub/software/network/ethtool/ and have used tar -zxvf https... to extract the files. This extracts a directory with the contents shown below:
After reading the INSTALL file, I ran ./configure but it gave me the following error: configure: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config
This meant that I could not run make or make install and thus am stuck.
After speaking to colleagues, the solution was found:
apt-get install -y pkg-config. Thereafter the following package was also needed: apt-get install -y libmnl-dev
Simple installed it with ./configure, make and make install and saw the ethtool version was as desired.

Installing janus-gateway error on CentOS7

I want to install janus-gateway on CentOS7.
I read the following document and tried installation.
https://github.com/meetecho/janus-gateway/blob/master/README.md
git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --prefix=/opt/janus
However, configuring janus-gateway will cause an error. The error is as follows.
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for JANUS... no
configure: error: Package requirements (
glib-2.0 >= 2.34
libconfig
nice
jansson >= 2.5
libssl >= 1.0.1
libcrypto
) were not met:
No package 'nice' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables JANUS_CFLAGS
and JANUS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
I installed libnice(libnice-0.1.3-4.el7.x86_64) in the following way.
yum install libnice
How can I solve it?
Thank you.
try this and rebuild
echo "export PKG_CONFIG_PATH=/usr/lib/pkgconfig" >> ~/.bashrc
source ~/.bashrc
Disclaimer: I am using Ubuntu 18.04 when testing this.
If you are using Ubuntu system and trying to install Janus and running this code
./configure --prefix=/opt/janus
And then getting this error: No package 'nice' found
Make sure you have been installation of the nice from aptitude.
sudo install aptitude
aptitude install libmicrohttpd-dev libjansson-dev \
libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \
libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \
libconfig-dev pkg-config gengetopt libtool automake
For some reason installation of nice using the answer from Frank, Ahmet or Zallfire doesn't work in Ubuntu. It has to be installed using aptitude.
You should download libnice source code to install.
https://gitlab.freedesktop.org/libnice/libnice
You need the development libnice.
yum install libnice-devel

Adding Qt Dependencies to spec file in rpmbuild

I'm using Ubuntu 14.04 and I am updating the rpmbuild spec file of an application that now uses Qt.
The packages that I need are the following:
sudo apt-get build-essential
sudo apt-get install mesa-common-dev -y
sudo apt-get install libglu1-mesa-dev -y
sudo apt-get qt5-default
sudo apt-get qtwebengine5-dev
I know the spec file has "BuildRequires" and "Requires" dependency tags...any help in writing this as well as some examples would be helpful. I have a working spec file I just need to add the dependencies.
I think there is some confusion here. spec files are used to generate rpm files. However Ubuntu uses deb files.
Supposing you really want to create an rpm; then you need to know this:
BuildRequires
these packages are required for building the rpm. Typically you will need build-essential and the '*-dev` packages for building your application
Requires
these packages are required upon installation for your application to work; mostly you don't need your build-tools anymore, but you still need the qt5-default for example.
PS: on a little side note I might be one of the only people in the world building deb packages using spec files with a special conversion script https://bitbucket.org/klaussfreire/spec2deb/src/default/ but I wouldn't really recommend that.

Not able to install mod_perl module on the server

In my site I am getting an error : an error occurred while processing this directive
It was working fine before moving to the new server. So when I checked I found that mod_perl module is missing. So I tried to install it by downloading the module to the server and then tried to run using Perl Makefile.pl but it was asking for apache src and I was not able to find it. I can see /usr/bin/apache/ folder but no source file inside the folder.
So I tried to install the module from Cpanel but I got the following error:
The C compiler is not functional and auto repair failed. Perl module installs require a working C compiler. Please repair the C compiler and try again.
Please let me know how to install it as I have tried most of the cases searching the net.
Thanks in advance
It's probably best to use your distro's packaging system to install mod_perl, especially, if apache is installed from a package too.
Yum based systems:
yum install mod_perl
Deb based systems
apt-get install mod_perl
you may need to enable the module using a2enmod
Mostly gcc is either corrupted or not present on your system. Please try to re/install gcc on your system
sudo apt-get update
sudo apt-get install build-essential
On Redhat:
yum update
yum install devtoolset-2-toolchain
It seems like a problem with your installation of gcc. You're using CloudLinux, so you should use yum to reinstall gcc.
$ sudo -i yum install gcc
But you don't need gcc if you install the pre-build packages.
$ sudo -i yum install mod_perl
Either way, you're going to need to get to grips with package installation for your system - and for that you're going to need root access.

Installing/Running CGAL on Ubuntu

I can't seem to install CGAL properly on my computer. I'm using Ubuntu, and I ran these commands, like it says to do in the directions.
sudo apt-get install libcgal-dev
sudo apt-get install libcgal-demo
They install fine, no errors. But then the directions say to cd into CGAL-4.7, but couldn't find it. I found a CGAL under /usr/include, and it seems to include all the algorithm files. But there are no MakeFile/CMakeLists to cmake.
I'm not sure what to do?
Never mind, once I found it, I tried this below and it worked
cd /path/to/program
cgal_create_CMakeLists -s executable
cmake -DCGAL_DIR=$HOME/CGAL-4.7 .
make