I'm working on kinetic(Ubuntu 1604) and trying to compile vision_opencv, it's Cmakelists.txt contains find_package(Boost REQUIRED python3).
And I use sudo apt install libboost-all-dev to install boost, but it still raises Could not find a package configuration file provided by "Boost.
What can I do?
Thanks,
Related
I cannot figure this out for the life of me.
When I pip install django-tenant-schemas it tries to install the dependency psycopg2 which requires the Python headers and gcc. I have all this installed and still keep getting this error!
./psycopg/psycopg.h:35:10: fatal error: libpq-fe.h: No such file or directory
So to install libpq-fe-h I need to sudo apt-get install libpq-dev..
..which returns..
libpq-dev is already the newest version (10.10-0ubuntu0.18.04.1).
Then when I sudo find / libpq-fe.h it doesn't seem to be in my OS.
I am lost at this point. If anyone can help I would highly appreciate it.
For some reason, the file is missing on the system.
As you're using apt-get, the system is dpkg based, presumably Debian or it's derivative. You can try the Ubuntu's package search to get which package contains a file with name ending in libpq-fe.h.
I found the package is libpq-dev and file's absolute path is /usr/include/postgresql/libpq-fe.h.
FWIW, on a dpkg based system, you can check which package gives a file if you know the file's absolute path:
% dpkg -S /usr/include/postgresql/libpq-fe.h
libpq-dev: /usr/include/postgresql/libpq-fe.h
Also, unlike find, locate keeps a cache of found files (mlocate.db) that is created everyday via cron; so if the file happens to be removed after the last run, you can run locate libfq-fe.h to get the absolute path to the file without needing to check the Ubuntu package search online.
So the package is libpq-dev. Now, reinstalling it will get everything to the default state i.e. all relevant files will be copied to the right places. As it is only a library package, no user/system level configurations will be overridden (and dpkg will prompt you for action for any package that does that).
To reinstall the package:
sudo apt-get install --reinstall libpq-dev
For me, I realized it was trying to use the deprecated setup.py so I installed wheel (pip install wheel) and that sorted it all out.
Well after installing these libraries
sudo dnf install python-virtualenv openssl-devel gcc libffi-devel libxslt-devel issue was not gone.
I used mlocate to find where libpq-fe.h file is located. On my system (Fedora 32) it was located at /usr/pgsql-10/include/libpq-fe.h
yum install mlocate
sudo updateb
locate libpq-fe.h
After all added this line to ~/.bash_profile
nano ~/.bash_profile
export PATH=/usr/pgsql-10/bin/:$PATH
Works fine, I can easily install psycopg2 without any trouble.
You need to create a LD_LIBRARY_PATH that indicates the path of your library /user/pgsql-11/lib
Source: The 3rd point of build prerequisites at https://www.psycopg.org/docs/install.html#build-prerequisites
I got the following error after running cmake for this :
Could NOT find Qt5FontDatabaseSupport (missing:
Qt5FontDatabaseSupport_LIBRARY Qt5FontDatabaseSupport_INCLUDE_DIR) (found
version "5.12.8")
I cannot find any package with that name in my linux repository.
That is one of the dependencies for the Qt QPA plugin , as stated in the CMakeLists.txt comments.
I use Kubuntu 20.04 with cmake 3.16 and Qt5.12.
Thanks.
Most likely you don't have the build dependencies installed. Qt5FontDatabaseSupport is part of the gui Qt module, for which the headers and devel files are installed with the qtbase5-dev package.
Kwin has many more build dependencies than qtbase, so the best if you install all of them with:
sudo apt build-dep kwin
at once, or with
sudo apt build-dep kwin-wayland
if you want to hack it under wayland.
By mistake i have deleted these libraries. I couldn't find a right way to reinstall it.
/usr/lib/x86_64-linux-gnu/libprotobuf.so.8
/usr/lib/x86_64-linux-gnu/libprotobuf-c.so.0
To fix it, i tried to follow these instructions, https://github.com/google/protobuf/blob/master/src/README.md
but ended up with different version. Now while compiling my code it throws this error. How can i get my previous version back?
error while loading shared libraries: libprotoc.so.8: cannot open shared object file: No such file or directory
Unknown OS: Installing the three packages providing libprotobuf.so.8, libprotobuf-c.so.0, libprotoc.so.8 →
sudo apt install --reinstall libprotobuf8 libprotobuf-c0 libprotoc8
HOWTO decide a package :
sudo apt install apt-file
apt-file search libprotoc.so.8
http://packages.ubuntu.com/search?keywords=libprotoc&searchon=names
I'm having a hard time trying to install Qt on linux. I downloaded the .run file on the website and installed Qt. However, when I try to compile the default Hello World project using Qtcreator, I get the following :
error cannot find -lGL
I was able to solve the problem by issuing the command :
sudo apt-get install libqt4-dev
But, I'm not satisfied with the solution as I want to use Qt5 and the name of the lib I downloaded implies version 4. Can someone explain what is going on and tell me if my solution is correct? If not, what should I do to get a working Qt on Linux.
Additional question
The correct answer, as provided by LtWorf, was to install libgl-dev. For future problems of this sort, can someone tell me how I should have guessed that I had to download this particular library? And why are there some libs with -dev at the end? What do they provide?
Well it is trying to link with libgl and doesn't find it. You should install libgl-dev.
-l is a linker option, it tells the linker to use a certain library.
For example you can have -lmagic meaning that you want to use libmagic.
Normally all libraries are called libsomething, and on debian you will find 3 packages called:
libsomething
libsomething-dbg
libsomething-dev
The 1st one is the library, the second one is the library compiled with the debug symbols, so you can make sense of stacktraces more easily, and the final one is the development package, it contains the .h files so you can link to the library.
sudo apt-get install libgl-dev
On Fedora 17, I did:
sudo yum install mesa-libGL-devel
Do you have libgl-dev installed? If not install it and it should work.
Those other posters are correct, but on some systems, the lib to install is named differently. I just dealt with a 32bit Ubuntu 14.04.5 LTS system, and libgl-dev was not available.
Instead, I needed to install the libgl1-mesa-dev package via:
sudo apt-get install libgl1-mesa-dev
I have project that depends on expat. My problem is that I cannot link to expat. I use Ubuntu (debian environment) and need to use cmake to build a makefile.
I´ve tried to download the source and link to it inside my CMakeLists.txt:
include_directories(
...
${CMAKE_SOURCE_DIR}/expat-2.1.0/lib
...
)
I have tried to move the .c-files and link to them individually:
add_executable(${PROJECT_NAME}
...
src/xmlrole.c
src/xmltok.c
src/xmltok_impl.c
src/xmltok_ns.c
src/xmlparse.c
...
)
Though this doesn´t work and get, when linking, error in xmlparse.c
Does somebody know how you properly link a library inside a CMakeLists.txt file? Is it necessary to download the source code and link to the file themselves (which I can´t get working)?
Is downloading the source necessary or is it possible to link to the ".so - file" that is created when running "sudo apt-get install expat"?
If you don't need the very latest expat version, you should be able to use sudo apt-get install expat.
If you want the most recent version, download the source and extract it. Then:
cd <expat root>
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr (default install path is /usr/local)
make
sudo make install
Once it's installed, you can find it using CMake's FindEXPAT module.
So for example,
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(MyTest)
include(FindEXPAT)
find_package(EXPAT REQUIRED)
include_directories(${EXPAT_INCLUDE_DIRS})
add_executable(${PROJECT_NAME} <list of your source files>)
target_link_libraries(${PROJECT_NAME} ${EXPAT_LIBRARIES})
As said you can use
sudo apt-get install expat.
and then in the makefile with
-lexpat
you can link to the library if exists in the $PATH.
If is installed to a different path you have to do
-L path_of_the_library -lexpat