Cannot add QtWebWidgets to project - c++

As the title says I can't add QtWebWidgets to any QT project. I'm running QT creator 3.2.0 based on Qt 5.3.1 run in Linux Mint 17. When I add
QT += webkitwidgets
to my .pro file I'm getting a lot of errors, which say that the compiler can't find file here's the compiler output:
/usr/bin/ld: cannot find -lgio-2.0
/usr/bin/ld: cannot find -lgstapp-0.10
/usr/bin/ld: cannot find -lgstinterfaces-0.10
/usr/bin/ld: cannot find -lgstpbutils-0.10
/usr/bin/ld: cannot find -lgstvideo-0.10
/usr/bin/ld: cannot find -lgstbase-0.10
/usr/bin/ld: cannot find -lgstreamer-0.10
/usr/bin/ld: cannot find -lgobject-2.0
/usr/bin/ld: cannot find -lgmodule-2.0
/usr/bin/ld: cannot find -lxml2
/usr/bin/ld: cannot find -lgthread-2.0
/usr/bin/ld: cannot find -lglib-2.0
collect2: error: ld returned 1 exit status
make: *** [web_browser] Error 1
21:24:24: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project web_browser (kit: Desktop Qt 5.2.1 GCC 64bit)
When executing step "Make"
Any ideas what's causing those errors?

Install in Ubuntu (or like)
Install g++
sudo apt-get install build-essential
Install OpenGL libraries
sudo apt-get install mesa-common-dev
sudo apt-get install libglu1-mesa-dev -y
After perform this:
sudo apt-get install libgstreamer1.0-dev
sudo apt-get install libgstreamer0.10-dev
sudo apt-get install libgstreamer-plugins-base1.0-dev
sudo apt-get install libgstreamer-plugins-base0.10-dev
And
sudo apt-get install qtbase5-dev
Other distros (like Debian)
After install QT perform this commands in terminal with su or sudo
First update (with su or sudo):
apt-get update
After install packages (with su or sudo):
apt-get install libxslt
apt-get install libxml2
apt-get install libgio2.0
apt-get install libgstapp0.10
apt-get install libgstinterfaces0.10
apt-get install libgstpbutils0.10
apt-get install libgstvideo0.10
apt-get install libgstbase0.10
apt-get install libgstreamer0.10
apt-get install libgobject2.0
apt-get install libgmodule2.0
apt-get install libgthread2.0
apt-get install libglib2.0
apt-get install libgl

Related

Can't build Firebird SQL on Oracle Linux 8 Ampere V1 (arm64) [duplicate]

I'm following the Matlab coder kalman tutorial in Matlab help. When using codegen, there's an error as below:
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
But there is libstdc++.so.6 in /lib/ and /usr/lib
For Fedora 16 use:
sudo yum install libstdc++-static
You can soft link the library to the name that is being sought
ln -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so
i did sudo apt-get install g++-4.7 it work for me for matlab .
If you're compiling a 32-bit application on a 64-bit CentOS 7:
sudo yum install libstdc++-devel.i686
For CentOS, be sure you have installed gcc-c++ package (it includes libstdc++-devel dependency):
sudo yum install gcc-c++

Trouble building caffe from source

I am trying to install caffe by building it from source
After issuing the following command from the caffe root directory
$ make all -j4
I am getting an error
...
CXX src/caffe/layer_factory.cpp
CXX src/caffe/blob.cpp
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0
/usr/bin/x86_64-linux-gnu-ld: cannot find -lpython3.6
collect2: error: ld returned 1 exit status
Makefile:582: recipe for target '.build_release/lib/libcaffe.so.1.0.0' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0] Error 1
Dependencies installed
$ sudo apt install python3-opencv
$ sudo apt-get install libatlas-base-dev
$ sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
$ sudo apt-get install --no-install-recommends libboost-all-dev
$ sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
$ sudo apt-get install the python3-dev
CUDA: CUDA 9 CuDnn 7.4
Ubuntu: Ubuntu 18.04
Makefile.config
I have looked at all the issues in the source Github repository but couldn't find anything useful.
Therefore that your error states cannot find -lpython3.6 you are missing the libpython3.6.so on your system.
Try to:
sudo apt-get install libpython3.6-dev
The issue is resolved, I had to make the following changes in Makefile.config file
From
PYTHON_LIBRARIES := boost_python3 python3.6
PYTHON_INCLUDE := /usr/include/python3.6 \
/usr/lib/python3.6/dist-packages/numpy/core/include
To
PYTHON_LIBRARIES := boost_python3 python3.6m
PYTHON_INCLUDE := /usr/include/python3.6m \
/usr/lib/python3.6/dist-packages/numpy/core/include

Error: unrecognized command line option ‘-Wno-invalid-source-encoding’ [-Werror] within building Mesos

My operating system is Ubuntu 18.10. I follow these steps on three nodes:
To install Mesos I did these steps one by one without any errors, except every node has already had Open JDK 8, so I did not install Open JDK 8 again.
sudo apt-get update
sudo apt-get install -y tar wget git
sudo apt-get install -y openjdk8-jdk (I did not do that)
sudo apt-get install -y autoconf libtool
sudo apt-get -y install build-essential python-dev python-six python-
virtualenv libcurl4-nss-dev libsasl2-dev libsasl2-modules maven
libapr1-dev libsvn-dev zlib1g-dev iputils-ping
The problem is begin when I want to build Mesos. I did these steps for that:
cd mesos-1.7.0
./bootstrap
mkdir build
cd build
../configure
make
My IP addresses are 150.20.11.137,150.20.11.134,150.20.11.157. I downloaded Mesos package on all of them and extracted in the same path.
I did <../configure> on every node without any problems, but when I run "make" I got this error on each node:
third_party/cares/cares/ares_init.c: In function ‘ares_dup’:
third_party/cares/cares/ares_init.c:301:17: error:
argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did
you mean to use the size of the destination? [-Werror=sizeof-pointer-
memaccess]
sizeof(src->local_dev_name));
^
third_party/cares/cares/ares_init.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-invalid-source-
encoding’ [-Werror]
cc1: all warnings being treated as errors
make[4]: *** [Makefile:2635: /home/spark/mesos-
1.7.0/build/3rdparty/grpc-
1.10.0/objs/opt/third_party/cares/cares/ares_init.o] Error 1
make[4]: Leaving directory '/home/spark/mesos-
1.7.0/build/3rdparty/grpc-1.10.0'
make[3]: *** [Makefile:1446: grpc-1.10.0-build-stamp] Error 2
make[3]: Leaving directory '/home/spark/mesos-1.7.0/build/3rdparty'
make 2]: *** [Makefile:1035: all-recursive] Error 1
make[2]: Leaving directory '/home/spark/mesos-1.7.0/build/3rdparty'
make[1]: *** [Makefile:765: all] Error 2
make[1]: Leaving directory '/home/spark/mesos-1.7.0/build/3rdparty'
make: *** [Makefile:768: all-recursive] Error 1
Problem solved. The problem was because of GCC version. GCC version in Ubuntu 18.10 is 8.2.0. I installed gcc-5 and g++-5 with this instruction:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
Then to choose GCC version that I want, I have to install "update-alternatives" for gcc. Therefore, I run these commands:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 500 --slave
/usr/bin/g++ g++ /usr/bin/g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave
/usr/bin/g++ g++ /usr/bin/g++-8
After that I chose gcc-5 with this command :
sudo update-alternatives --config gcc
Moreover, I had an error related to OpenSSL; then I installed it via this command:
sudo apt-get install libssl-dev
After those modifications, I started to install Mesos and it installed without any errors. I hope this illustration was helpful for others.

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.

Unmet dependency: xscrnsaver

when I build qtwebengine with following this steps, I get
Unmet dependency: xscrnsaver
QtWebEngine will not be built.
I cannot find xscrnsaver with sudo apt-file find xscrnsaver, and even I sudo apt-get install xscreensaver, the error still exist, how to fix it?
I find the solution, the reason is I miss libxss since I copy(from guide) following code to terminal:
sudo apt-get install libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev
libfontconfig1-dev libxss-dev
code has 2 lines, it means I doesn't install "libfontconfig1-dev libxss-dev", so the right code is:
sudo apt-get install libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libfontconfig1-dev libxss-dev