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
Related
I am trying to install gcc and g++ version 4.8 to run a specific software in Ubuntu 22.04.1
when I perform
sudo apt-get install g++-4.8
it says
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package g++-4.8
E: Couldn't find any package by glob 'g++-4.8'
E: Couldn't find any package by regex 'g++-4.8'
and When I perform
sudo apt-get install gcc-4.8
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'gcc-4.8-hppa64' for regex 'gcc-4.8'
The following packages were automatically installed and are no longer required:
chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi i965-va-driver intel-media-va-driver libaacs0 libaom3 libass9 libavcodec58 libavformat58 libavutil56 libbdplus0 libbluray2
libbs2b0 libchromaprint1 libcodec2-1.0 libdav1d5 libflashrom1 libflite1 libftdi1-2 libgme0 libgsm1 libgstreamer-plugins-bad1.0-0 libigdgmm12 liblilv-0-0 libmfx1 libmysofa1
libnorm1 libopenmpt0 libpgm-5.3-0 libpostproc55 librabbitmq4 librubberband2 libserd-0-0 libshine3 libsnappy1v5 libsord-0-0 libsratom-0-0 libsrt1.4-gnutls libssh-gcrypt-4
libswresample3 libswscale5 libudfread0 libva-drm2 libva-wayland2 libva-x11-2 libva2 libvdpau1 libvidstab1.1 libx265-199 libxvidcore4 libzimg2 libzmq5 libzvbi-common libzvbi0
mesa-va-drivers mesa-vdpau-drivers pocketsphinx-en-us va-driver-all vdpau-driver-all
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
What could be done?
You could possibly recompile gcc 4.8.5 with the following script. However there is a lot that can go wrong depending on the machine that you are compiling it since the compiler itself depends on a large set of utilities - called the toolchain and they are tightly coupled with the machine's own system libraries, in particular the C standard library.
sudo dpkg --add-architecture i386
sudo apt update
sudo apt upgrade
sudo apt-get install gcc-multilib libstdc++6:i386
wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 --no-check-certificate
tar xf gcc-4.8.5.tar.bz2
cd gcc-4.8.5
./contrib/download_prerequisites
cd ..
sed -i -e 's/__attribute__/\/\/__attribute__/g' gcc-4.8.5/gcc/cp/cfns.h
sed -i 's/struct ucontext/ucontext_t/g' gcc-4.8.5/libgcc/config/i386/linux-unwind.h
mkdir xgcc-4.8.5
pushd xgcc-4.8.5
$PWD/../gcc-4.8.5/configure --enable-languages=c,c++ --prefix=/usr --enable-shared --enable-plugin --program-suffix=-4.8.5
make MAKEINFO="makeinfo --force" -j
sudo make install -j
While installing xorg with conan install .. command,
system requirements are checked in conan receipe using pkg-config tool.
Each missing system package raises an exception, and thus stop the conan install command.
ERROR: xorg/system: Error in package_info() method, line 97
self._fill_cppinfo_from_pkgconfig(name)
while calling '_fill_cppinfo_from_pkgconfig', line 24
if not pkg_config.provides:
ConanException: pkg-config command ['pkg-config', '--print-provides', 'xcb-renderutil', '--print-errors'] failed with error: Command 'pkg-config --print-provides xcb-renderutil --print-errors' returned non-zero exit status 1.
Package xcb-renderutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-renderutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xcb-renderutil' found
I cannot get those system packages to be installed by conan tool, am I missing a command line argument while invoking conan ?
you can ask conan to install binary packages into your system ( sudo apt-get install ... ) by himself. See my example:
sudo conan install /home/username/QtProj/console_test1/QCoreApplication_quit_example/conanfile.txt --build=qt -c tools.system.package_manager:mode=install
To use it your conan version must be installed using sudo. If you get:
sudo: conan: command not found
You should do:
pip uninstall conan
sudo pip install conan
There are usually distribution-specific package manager warnings listing what dependencies need to be installed above this line:
ERROR: xorg/system:...
For example, on Ubuntu 22.04 I got the following after adding opencv/4.5.5 to my conanfile.txt:
...
dpkg-query: no packages found matching libx11-xcb-dev
dpkg-query: no packages found matching libfontenc-dev
dpkg-query: no packages found matching libxaw7-dev
dpkg-query: no packages found matching libxkbfile-dev
dpkg-query: no packages found matching libxmu-dev
dpkg-query: no packages found matching libxmuu-dev
...
ERROR: xorg/system:...
You can resolve this by installing the listed dependencies. In my case this is what solved it:
sudo apt-get install -y xorg openbox xauth libx11-xcb-dev libx11-xcb-dev libfontenc-dev libxaw7-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev
I got a question concerning OpenCV and OpenMP.
I used to parallelize my code using OpenMP, since I have to do some heavy computing on large images. Up to now (I did not use OpenCV so far) the parallelization worked fine for me.
Then I needed some functionality of the OpenCV library. Since I incorporated OCV in my code, the parallelization no longer works. Allthough I am NOT parallelizing any OCV functions. Moreover, even if I only link in the OCV libraries (core, imgproc, imgcodecs), parallelization does not work anymore.
So, how can that be? And how can I enable the parallelization (again)?
I use OpenCV 4.1 on a OpenSuSE 15.1 system. IDE is Code::Blocks. All libraries where installed from official repos (meaning: I have no clou how to work with cmake...).
Could anybody give me a hint, how to fix this?
Thank you
Phtagen
This installation guide assumes that the OS is Ubuntu. I post it because it will probably help solving your problem.
Install OpenCV dependencies.
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev libv4l-dev
sudo apt-get install libcanberra-gtk-module libcanberra-gtk3-module
Download the source code of the OpenCV version you like with some extra modules.
CV_DISTRO=3.4.0
git clone --branch $CV_DISTRO https://github.com/opencv/opencv.git opencv_$CV_DISTRO --depth 1
git clone --branch $CV_DISTRO https://github.com/opencv/opencv_contrib.git opencv_contrib_$CV_DISTRO --depth 1
Then build OpenCV.
cd opencv_$CV_DISTRO
mkdir -p build
cd build/
cmake -D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib_$CV_DISTRO/modules \
-D WITH_TBB=ON \
-D OPENCV_ENABLE_NONFREE=ON \
-D WITH_OPENMP=ON ..
make -j7
sudo make install
sudo ldconfig
Feel free to edit this post.
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.
I'm trying to install g++ 4.9 or greater in order to build mapbox on Android. The instructions state I need g++ 4.9 or greater. I found the following instructions, but they don't work.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.9
The last command says:
~ $ sudo apt-get install g++-4.9
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package g++-4.9 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'g++-4.9' has no installation candidate
I also tried from Synaptic Package Manager and got the following:
g++:
Depends: cpp (>=4:4.9-1ubuntu7) but 4:4.8.2-1ubuntu6 is to be installed
Depends: gcc (>=4:4.9-1ubuntu7) but 4:4.8.2-1ubuntu6 is to be installed
Depends: g++-4.9 (>=4.9) but it is not installable
Depends: gcc-4.9 (>=4.9) but it is not installable
How can I get g++ 4.9 on my computer?
Thanks.
Here is how to install g++-4.9 on Linux Mint 17.2 Rafaela
Go to menu -> Administration -> Software sources
Click on Additional repositories and then Getdeb
Click on Edit URL...
Replace deb http://archive.getdeb.net/ubuntu trusty-getdeb apps
by
deb http://archive.getdeb.net/ubuntu wily-getdeb apps
and click on Update the cache
At this point you can go with
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.9
You can invoke your g++ like this:
g++-4.9
Now you have g++ 4.9.3 installed
And as an add, you can have the latest g++-5 (g++ 5.2.1) compiler
sudo apt-get install g++-5