Ubuntu Qmake is not an executable - c++

after installing new version of QtCreator in Ubuntu and
tux-world#alachiq:~ > sudo apt-get install qt5-qmake build-essential g++ gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
g++ is already the newest version.
g++ set to manually installed.
gcc is already the newest version.
qt5-qmake is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 247 not upgraded.
in option of Build & Run and choose qmake in `/usr/bin/qmake' i get this error :
The qmake executable /usr/lib/i386-linux-gnu/qt4/bin/qmake could not be added: qmake '/usr/lib/i386-linux-gnu/qt4/bin/qmake' is not an executable.
in Home system i don't have any problem after installing those packages and setting Qmake in option
Other information:
tux-world#alachiq:~ > apt-cache search qt5-qmake
qt5-qmake - Qt 5 qmake Makefile generator tool
tux-world#alachiq:~ > ldd /opt/qtForArm/bin/qmake
ldd: /opt/qtForArm/bin/qmake: No such file or directory
tux-world#alachiq:~ > sudo chmod +x /usr/lib/i386-linux-gnu/qt4/bin/qmake
[sudo] password for tux-world:
chmod: cannot access ‘/usr/lib/i386-linux-gnu/qt4/bin/qmake’: No such file or directory
UPDATE:
after installing Qmake that is under this directory:
tux-world#alachiq:~ > whereis qmake
qmake: /usr/bin/qmake /usr/bin/X11/qmake
List Directory on /usr/sbin:
tux-world#alachiq:~ > ls -a /usr/sbin/qmake
ls: cannot access /usr/sbin/qmake: No such file or directory
Check Executable and other information qmake:
tux-world#alachiq:~ > ls -a -l /usr/bin/qmake
lrwxrwxrwx 1 root root 9 فوریه 19 15:53 /usr/bin/qmake -> qtchooser

my problem is resolved after installing qt5-default:
sudo apt-get install qt5-default
Thanks

From the updated question it is clear that
/usr/bin/qmake is a soft link to qtchooser
The error message with the qtchooser is normal, although uninformative. In essence you're trying to execute qtchooser with itself, which doesn't work.
Run the $ man qtchooser command on a terminal for how to use qtchooser
If you are not able to see the man page for qtchooser or if the problem persists then I suggest you to install
$ sudo apt-get install qt-sdk
Hope this would solve your problem

Try to set the qmake path to /usr/lib/i386-linux-gnu/qt5/bin/qmake. This is where qt5-qmake installs its qmake executable.

Related

How to build and install dpdk v.18.08 on Centos 7.6 with gcc?

I am trying to build and install dpdk v.18.08 on Centos 7.6 with gcc 4.8.5.
This is what I have done:
$ tar xvfz /opt/dpdk/dpdk-18.08/tar.gz
$ cd /opt/dpdk/dpdk-18.08
$ make -j T=x86_64-native-linuxapp-gcc install
<snip>
Build complete [x86_64-native-linuxapp-gcc]
Installation cannot run with T defined and DESTDIR undefined
How can I fix this failure to install?
If you want a specific folder to house current binaries and library, 'make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc'.
This will create a folder 'x86_64-native-linuxapp-gcc'. You have set RTE_TARGET as x86_64-native-linuxapp-gcc. Then build by 'cd x86_64-native-linuxapp-gcc; make -j 10'
Edit: O in 'make config' is the target folder.

How to install Boost from source

I am trying to install the Boost C++ from source.
I first tried using yum to install them in (Amazon Linux AMI) but it installed a version that is too old. I need at least version 1.54
So I tried to follow the instructions here:
https://www.boost.org/doc/libs/1_70_0/more/getting_started/unix-variants.html
Once I downloaded the source, I tried symlinking the header files to /usr/include:
ln -s /root/boost_1_70_0/boost /usr/include/boost
Then I followed the instructions to try to build:
cd /root/boost_1_70_0
./bootstrap.sh
./b2 install
Then when I try to compile my program that needs boost libraries (happens to be OSRM), I get this error:
make[2]: *** No rule to make target `/usr/lib64/libboost_date_time-mt.so', needed by `osrm-components'. Stop.
So it seems somehow I need to build the boost .so files to go in /usr/lib64. But how do I do that?
I believe that you've already built the boost .so files but I don't know where. It normally tries to install them in /usr/local, see section 5.1 of the instructions you referenced.
You may be able to find them with locate, e.g.:
locate boost
Otherwise, you can call ./bootstrap.sh with a prefix indicating where you want it to build the libraries, e.g.:
./bootstrap.sh --prefix=/root/boost_1_70_0/stage
./b2 install
You can then copy the .so files together with with their symbolic links to /usr/lib64, e.g.:
cd /usr/lib64
rm -fr libboost*
cp -a /root/boost_1_70_0/stage/lib/libboost* .
chmod a+x libboost*
Note: the line rm -fr libboost* in /usr/lib64 is to remove the very old version of boost that you installed with yum.

fatal error: hdf5.h: No such file or directory [duplicate]

I am having trouble when installing Caffe Deep Learning Framework on Python:
When I run make command at caffe directory, it says
hdf5.h:no such directory
The steps I have done:
Update and upgrade my Ubuntu Server
Install Python 2.7
Having all of the dependencies base on http://caffe.berkeleyvision.org/install_apt.html
Run cp cp Makefile.config.example Makefile.config
Uncomment cpu_only = 1 in Makefile.config
I will be grateful if someone can help me.
Error message:
CXX src/caffe/util/hdf5.cpp
in file include from src/caffe/util/hdf5.cpp:1:0:
./include/caffe/util/hdf5.hpp:6:18: fatal error: hdf5.h: No such file or directory
compilation terminated
Makefile:572 recipe for target '.build_release/src/caffe/util/hdf5.o'
failed Make:*** [.build_release/src/caffe/util/hdf5.o] Error 1
What is the version of your Ubuntu install? Try this. In your Makefile.config try to append /usr/include/hdf5/serial/ to INCLUDE_DIRS:
--- INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
+++ INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
and rename hdf5_hl and hdf5 to hdf5_serial_hl and hdf5_serial in the Makefile:
--- LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
+++ LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial
More about the bug fix here.
This solution worked for me on the Ubuntu16.04LTS
sudo apt-get install libhdf5-10
sudo apt-get install libhdf5-serial-dev
sudo apt-get install libhdf5-dev
sudo apt-get install libhdf5-cpp-11
find /usr -iname "*hdf5.h*"
/usr/include/hdf5/serial/hdf5.h
export CPATH="/usr/include/hdf5/serial/"
Another case I've experienced with:
I was using Ubuntu 14.04 and installing hdf5-1.10.0.
I found hdf5.h was located in /usr/local/hdf5/include. Thus, I modified Makefile.config file by adding that location to INCLUDE_DIRS.
# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include \
/usr/local/hdf5/include
I didn't rename anything in Makefile. It worked fine.
It did not work for me on Ubuntu16.04 LTS.
So I had to
sudo apt-get install libhdf5-10
sudo apt-get install libhdf5-serial-dev
sudo apt-get install libhdf5-dev
sudo apt-get install libhdf5-cpp-11
find /usr -iname "*hdf5.h*"
/usr/include/hdf5/serial/hdf5.h
Now do this
export CPATH="/usr/include/hdf5/serial/"
On RHEL7, I got tired of hunting for specific hdf5 RPMs and ran:
sudo yum install *hdf5*
and these are what I have:
hdf5-openmpi3-static-1.8.12-11.el7.x86_64
hdf5-1.8.12-11.el7.x86_64
hdf5-openmpi-static-1.8.12-11.el7.x86_64
hdf5-openmpi3-devel-1.8.12-11.el7.x86_64
hdf5-openmpi3-1.8.12-11.el7.x86_64
hdf5-mpich-devel-1.8.12-11.el7.x86_64
hdf5-devel-1.8.12-11.el7.x86_64
hdf5-openmpi-devel-1.8.12-11.el7.x86_64
hdf5-mpich-static-1.8.12-11.el7.x86_64
hdf5-mpich-1.8.12-11.el7.x86_64
hdf5-openmpi-1.8.12-11.el7.x86_64
Thanks to #loretoparisi, I was able to figure out where I had the header file I was missing and the problem went away.
$ find /usr -iname "*hdf5.h*"
/usr/include/openmpi-x86_64/hdf5.h
/usr/include/hdf5.h
/usr/include/mpich-x86_64/hdf5.h
/usr/include/openmpi3-x86_64/hdf5.h

How to Install Wt into a Custom Folder Without "fatal error: Wt/WApplication: No such file or directory"

I'm new to Wt and c++ and I just installed the Wt webframework on Ubuntu 16.04 LTS into a custom folder in my home directory. I cannot install or build any software into the /usr diretories of this computer. Even if I could, the PPA hasn't been active for 2 1/2 years, and the official Ubuntu installation instructions are also outdated. Aptitude no longer ships with Ubuntu and will eventually be discontinued.
I compliled and installed everything successfully, yet when I try to compile the Hello World example I get the following error:
g++ -o hello hello.cpp -lwt -lwthttp
fatal error: Wt/WApplication: No such file or directory
Here are my installation steps:
Boost:
wget https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.bz2
tar --bzip2 -xf boost_1_65_1.tar.bz2
cd boost_1_65_1
./bootstrap.sh --prefix=../myfolder
sudo ./b2 install --prefix=../myfolder
CMake:
wget https://cmake.org/files/v3.9/cmake-3.9.2.tar.gz
tar -xvzf cmake-3.9.2.tar.gz
cd cmake-3.9.2
./configure --prefix=../myfolder
make
sudo make install
vim .profile
export PATH=$PATH:/home/ubuntu/myfolder/bin
Wt:
git clone https://github.com/emweb/wt.git
cd wt
cmake -DCMAKE_INSTALL_PREFIX:PATH=../myfolder .
-- Generating done
-- Build files have been written to: /home/ubuntu/myfolder
make
sudo make install
make -C examples
Since I'm lumping everything together in /myfolder I did not use the /build folder per the Wt installation instructions. The libwt and libboost libraries are in /myfolder/lib. I assumed all of the linking was taken care of during installation.
Any thoughts? Thanks in advance.
You have to tell your compiler to look for includes and libraries in the right folders, so instead of:
g++ -o hello hello.cpp -lwt -lwthttp
Try:
g++ -o hello hello.cpp -I/home/ubuntu/myfolder/include -L/home/ubuntu/myfolder/lib -lwt -lwthttp
Note that when you run your application, you'll also have to make sure that it can find the dynamic libs (.so files) it needs. You could do this:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/ubuntu/myfolder/lib"

How to recover default boost installation on ubuntu?

I was trying to compile boost 1.62 from source on ubuntu 12.04 where the default version is 1.48. During the course of trying everything, I removed boost from /usr/include/boost and libboost* from /usr/lib using the following commands
sudo rm -r /usr/include/boost
sudo rm -r /usr/include/libboost*
I have realized that now I need the default version (1.48) for my program to work. But when I use the following command
sudo apt-get install libboost-dev-all
it seems to install the libboost, but I am not able to see any boost directory in /usr/include. Moreover, I tried compiling a few programs with cmake and it also doesn't seem to find any boost library on the system.
Is it not possible to reinstall libboost if the libraries and headers have been removed manually ?
from the ubuntu forums :
choices:
sudo apt-get install --reinstall mypackage
sudo dpkg-reconfigure mypackage
( or if the other solutions have failed:
sudo apt-get purge mypackage && sudo apt-get install mypackage
and logout/in )
give it a shot !
also if you don't see any librarie after installing one you can run :
sudo ldconfig
The above command will make ld (the dynamic libraries loader) aware of the new libraries.