fatal error: yaml-cpp/yaml.h: No such file or directory - c++

I am trying to compile my own c++/qt5.2 app which uses yaml-cpp under Ubuntu 14.04.
While issuing the make command I get the following error
fatal error: yaml-cpp/yaml.h: No such file or directory
on the line:
#include <yaml-cpp/yaml.h>
How can I fix this?

You need to install the yaml-cpp library.
Under Ubuntu 14.04 you can do this by simply running one of the following commands in a terminal window (depending one the API you use):
sudo apt-get install libyaml-cpp-dev
or
sudo apt-get install libyaml-cpp0.3-dev
See the yaml-cpp project page for other operating systems and differences between old (0.3) and new API.

Related

Cannot find c++ boost header files on Ubuntu 20.04 LTS using apt installation

I have just upgraded my server to ubuntu 20.04 LTS.
I am now trying to various different code packages on it and receiving errors relating to the boost installation.
Rather than building from source, I have installed boost 1.71.0 using apt:
sudo apt-get install libboost-all-dev
However, when I try and compile code I am getting errors such as:
fatal error: boost/algorithm/string/trim.hpp: No such file or directory
15 | #include <boost/algorithm/string/trim.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
boost/log/sinks/text_ostream_backend.hpp: No such file or directory
6 | #include <boost/log/sinks/text_ostream_backend.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have spent the last 3 hours trying to find those hpp files with no success. There is nothing in:
/usr/local/include/
/usr/local/lib/
/usr/lib/
/usr/include/boost *doesn't exist*
Any idea what could be wrong?
I'm trying to avoid installing boost from source, rather than the Ubuntu package but do I have to?
Managed to resolve the issue.
Turns out that because I had a previous boost installation from a manual installation (before I upgraded to 20.04 LTS) and had deleted those files manually, further re-installs via apt were not recreating the files in usr/include/, due to other packages relating to boost still installed in the system.
The recovery was to run apt list --installed '*boost*' and then uninstall any of those linked packages.
After doing that running sudo apt install libboost-all-dev recreated the /usr/include/boost directory with all the header files.
This process was listed in the answer on: https://askubuntu.com/questions/1161393/i-deleted-usr-include-boost-installing-libboost-all-dev-wont-bring-headers-ba

Installing node js pulsar client on ubuntu

I am trying to install the pulsar-client for node js client on ubuntu. I get the following error:
fatal error: pulsar/c/message.h: No such file or directory #include <pulsar/c/message.h>
compilation terminated.
Pulsar.target.mk:116: recipe for target 'Release/obj.target/Pulsar/src/addon.o' failed
make: *** [Release/obj.target/Pulsar/src/addon.o] Error 1
the documentation says
Pulsar Node.js client library is based on the C++ client library.
Follow the instructions for C++ library for installing the binaries
through RPM, Deb or Homebrew packages.
(Note: you will need to install not only the pulsar-client library but
also the pulsar-client-dev library)
However, the instructions for installing C++ library on Ubuntu are not very clear. It is also not clear how to install pulsar-client-dev library.
You are right that C++ library must be installed. One note is please make sure the compatible C++ library is installed.
https://github.com/apache/pulsar-client-node#compatibility
To install C++ library ubuntu, here is an example which is from our Docker image build on Ubuntu based.
https://github.com/kafkaesque-io/pulsar-beam/blob/master/Dockerfile#L29
wget --user-agent=Mozilla -O apache-pulsar-client.deb "https://archive.apache.org/dist/pulsar/pulsar-2.4.1/DEB/apache-pulsar-client.deb"
wget --user-agent=Mozilla -O apache-pulsar-client-dev.deb "https://archive.apache.org/dist/pulsar/pulsar-2.4.1/DEB/apache-pulsar-client-dev.deb"
apt install -y ./apache-pulsar-client.deb
apt install -y ./apache-pulsar-client-dev.deb

Thrift Build stopped with "src/thrift/transport/TSSLSocket.cpp:43:10: fatal error: 'openssl/opensslv.h' file not found"

I was trying to install thrift(0.11.0) over my system(macOs 10.14.5).For which I downloaded and extracted tar file. Then I ran following commands :
./bootstrap.sh
./configure
make
make install
while execution of make, I got following error :
src/thrift/transport/TSSLSocket.cpp:43:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
I tried installing openssl and cryptography and they were already upto date.
Any advice on what I should do to fix this?
Since you're on macos, I assume that openssl headers are installed using Homebrew. If not, install them like this:
brew install openssl
However, the library headers themselves will still not be in the system's usual /usr/include directory. Therefore to add the headers in brew to the system's default include directory that will be searched by most compilers, try this:
sudo ln -s /usr/local/opt/openssl/include/openssl/ /usr/include/
This worked for me when I encountered the same issue when installing some pypy pip requirements.

Unable to locate package GLFW on Linux Mint

I have been trying to install GLFW and GLFW3, using Terminal to install
sudo apt-get install GLFW
sudo apt-get install GLFW3
Whenever I do so, I get results such as
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package glfw3
I have been trying to install GLFW for two hours now, and I'm getting a bit impatient. Also I'm very new to Linux (Mint), so I apologize if I'm doing something stupid...
EDIT:
No matter what I try, my program encounters
/home/myusername/Desktop/basic_window.cpp:11:21: fatal error: GL/glfw.h: No such file or directory
#include <GL/glfw.h>
^
compilation terminated.
Having a frustrating time with this, not sure why this is much more complicated than the other libraries I've installed so far.
I have been trying to install GLFW and GLFW3, using Terminal to install...
On Mint 17, it looks like you need to install libglfw2. So perform a sudo apt-get install libglfw2.
If you plan on developing against it, then install libglfw-dev instead. Notice the lack of a version number.
If interested, perform apt-cache search glfw
In Debian-based systems such as Ubuntu and Mint, library packages typically have names that begin with "lib", and development headers (for compiling new programs that use the library) are in a separate package whose name ends with "-dev".
Ubuntu 14.04 has GLFW 2 packaged as libglfw2 and libglfw-dev. Mint doesn't seem to have those packages, but you can probably use the Ubuntu ones since Mint 17 is based on Ubuntu 14.04.
GLFW 3 isn't in Ubuntu 14.04, but it looks like it'll be in 14.10 (as libglfw3 and libglfw3-dev).
Unless you really need GLFW 3 specifically, you're probably better off sticking with the packaged GLFW 2. Packages get easy automatic upgrades; compiling stuff "by hand" is a good way to end up with lots of cruft in your system with no automatic upgrade or uninstall.
Download GLFW source packages from their website.
Extract the folder glfw-3.0.4 from the tarball
Open console
Navigate to the folder you just extracted and go inside of it using cd
Type cmake . (be sure you include the dot)
If cmake . fails, then type the following as root:
apt-get install cmake
If you don't think you're root then type the following:
sudo apt-get install cmake
If that doesn't work then type the following as root, or add sudo if you're not root:
apt-get install build-essential cmake
Once you have cmake installed, navigate back to the folder and try cmake . again.

How do I install Audiere?

I'm trying to install PyAudiere (on MacOS 10.5), and it needs Audiere installed. I downloaded the Unix source from the Audiere website and ran configure and the makefile. I also tried adding audiere.h to the g++ include path with the command:
g++ -I /[...]/audiere-1.9.4/src audiere.h.
This did something, but I'm not sure what. When I try to install PyAudiere using
python setup.py install
it always says
error: audiere.h: No such file or directory.
Have I installed Audiere? If not, how do I do it?
Disclaimer: I know virtually nothing about mac OS
If you have run configure:
./configure
and the makefile:
make
Have you then run:
make install
Without running make install you have simply compiled the files but not installed them into your system. Under linux you might have to run sudo make install in order to get the administrative privileges required to install files.