json.hpp required on linux - json

Hi I'm trying to install packet on Ubuntu 18.04 LTS but when I use the command cmake ../ I receive the message:
-- Poco_VERSION: 1.8.0
-- Poco_INCLUDE_DIRS:
-- Poco_LIBRARIES: Poco::Foundation;Poco::Util;Poco::XML;Poco::Net
-- Build type not specified: defaulting to release.
CMake Error at CMakeLists.txt:25 (message):
LoRa toolkit requires json.hpp, skipping...
-- Configuring incomplete, errors occurred!
See also "/home/jayme/LoRa-SDR/build/CMakeFiles/CMakeOutput.log".
See also "/home/jayme/LoRa-SDR/build/CMakeFiles/CMakeError.log".`
I have already installed json.hpp using git clone in this link: https://github.com/nlohmann/json.git but didn't work.

Assuming you try to build https://github.com/myriadrf/LoRa-SDR according to their README.md's instructions and have already successfully installed Pothos, I can reproduce you above error message.
As you already noticed, the problem is that json.hpp cannot be found. Cloning the repository is only the first step to solving this. Assuming you don't want a systemwide installation of json.hpp I would add include/ of the json project to cmake's search paths by specifying it on the command line:
cmake -DCMAKE_INCLUDE_PATH=/full/path/to/json/include ../

Related

Puppeteer error: "failed to launch the browser process"

I am trying to run Puppeteer on my new laptop. However, I am getting this error:
node:8144) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/mnt/c/Users/juliu/repos/kmj-sniper/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory
What am I missing here?
The error message can either indicate that your operating system is missing the ATK library (libatk), or that this shared library is installed in a location that Puppeteer does not know about, because it is not available from the paths specified in the environment variable LD_LIBRARY_PATH, or has a different name from what is expected.
If the ATK library is missing, what platform your laptop is running will likely determine the answer. If you are running Ubuntu, for example, you could do the following, or similar:
$ sudo apt-get install libatk-bridge2.0-0
On CentOS/RHL, perhaps:
$ sudo yum install atk.x86_64
If the required package is already installed, however, check that LD_LIBRARY_PATH includes the directory where the shared library is installed, and that the filename matches that shown in the error message returned by Puppeteer.
Delete folder node_modules (don't delete the package.json and package-lock.json files) and then run npm i.
It will essentially reinstall all your dependencies.
If that doesn’t work, then try Alex's answer.

Qt Library 'mysql' is not defined

I have a problem with Qt connecting with MySql, when i run this code
QSqlDatabase DBObject = QSqlDatabase::addDatabase("QMYSQL");
DBObject.setHostName("localhost");
DBObject.setDatabaseName("SingleDB");
DBObject.setUserName("root");
DBObject.setPassword("abc123");
bool ok = DBObject.open();
and I got this... QSqlDatabase: QMYSQL driver not loaded
I Have already done this also:
sudo apt-get install libmysqlclient
and
/home/wrm/Qt/5.12.3/gcc_64/bin/qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
and here i have this error: Project ERROR: Library 'mysql' is not defined
Any idea?
Perhaps you need to install mysql-devel.
According to the Qt Docs QMYSQL for MySQL 4 and higher:
How to Build the QMYSQL Plugin on Unix and macOS
You need the MySQL header files, as well as the shared library libmysqlclient.so. Depending on your Linux distribution, you may need to install a package which is usually called "mysql-devel".
Google doesn't have a readily available answer, so answering this old question:
Aside from needing development files as pointed above (like apt install libmysqlclient-dev), you need to generate a config:
# Just for making my snippet work. Feel free to hardcode paths.
export QTDIR=/home/you/Qt/
export QTVERSION=5.9.5
cd $QTDIR/$QTVERSION/Src/qtbase/src/plugins/sqldrivers
$QTDIR/$QTVERSION/gcc_64/bin/qmake sqldrivers.pro
cd mysql
make
make install # if you want; it installs it in the bin dir of $QTVERSION
In the past, this was not necessary for Qt 5.5 (where I did this last time).
On a side note, there is no longer a special thread-safe version of libmysqlclient (libmysqlclient_r). It's just one one. Last time I ran into that link error, I just edited the generate Makefile to use the non-_r.

install_driver(mysql) failed: Can't locate DBD/mysql.pm

Question is not repeated, first read the problem which I am facing, then mark it if it is repeated, will be helpful if repeatation of my question helps me in solving my problem, As I have been through all the links and solutions mentioned on other similar questions and problems but no luck.
I am trying to setup redmine git on my ec2-aws-instance with help of below link
https://docs.bitnami.com/installer/how-to/configure-advanced-integration-git-redmine/
I am able to properly connect redmine projects with my git repositories but once I reach third step on above link I am facing issue as below
step :- 3 Configure Git Access Control
Below is the error when try to secure my git repository with redmine user credentials.
[Thu Feb 21 17:46:26.918619 2019] [perl:error] [pid 26820:tid
139790464616192] [client 127.0.0.1:50156] install_driver(mysql)
failed: Can't locate DBD/mysql.pm in #INC (#INC contains:
/opt/bitnami/git/lib/site_perl/5.16.3
/opt/bitnami/perl/lib/5.16.3/x86_64-linux-thread-multi
/opt/bitnami/perl/lib/5.16.3
/opt/bitnami/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi
/opt/bitnami/perl/lib/site_perl/5.16.3
/opt/bitnami/perl/lib/5.16.3/x86_64-linux-thread-multi
/opt/bitnami/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi
/bitnami/ruby23stack-linux-x64/output/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi
/bitnami/ruby23stack-linux-x64/output/perl/lib/site_perl/5.16.3
/bitnami/ruby23stack-linux-x64/output/perl/lib/5.16.3/x86_64-linux-thread-multi
/bitnami/ruby23stack-linux-x64/output/perl/lib/5.16.3 .
/opt/bitnami/apache2) at (eval 6) line 3.\nPerhaps the DBD::mysql perl
module hasn't been fully installed,\nor perhaps the capitalisation of
'mysql' isn't right.\nAvailable drivers: DBM, ExampleP, File, Gofer,
Proxy, Sponge.\n at
/opt/bitnami/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi/Apache/Redmine.pm
line 557.\n App 26921 stdout:
Without third step my repositories are public, any who knows the repo url can clone my repos or perform other operations on my git repos. So third step is for security purpose as per above document link and which is important for me.
Once I add below line into apache config as per documentation mentioned I am getting above error in my bitnami log when I try to clone a repository
<Location "/">
AuthType Basic
AuthName "Redmine git repositories"
Require valid-user
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
RedmineDSN "DBI:mysql:database=bitnami_redmine;host=localhost;mysql_socket=installdir/mysql/tmp/mysql.sock"
RedmineDbUser "REDMINE_DB_USERNAME"
RedmineDbPass "REDMINE_DB_PASSWORD"
RedmineGitSmartHttp yes
</Location>
When I run a following command to clone a repo, without third step on documentation, I am properly able to clone the repo, but with third step I am failing and getting above error in log and below error on command line.
bitnami#127.0.0.1:/tmp$ git clone http://git.domain.com/test2
Cloning into 'test2'...
fatal: unable to access 'http://git.domain.com/test2/': The requested URL returned error: 500
I have even tried installing below package but no luck
sudo apt-get install libdbd-mysql-perl
my os is
Ubuntu 16.04.5 LTS \n \l
In order for a Perl installation to talk to a MySQL database, it needs to use the DBD::mysql module. This module isn't part of the standard Perl installation and needs to be installed separately. When you install it using the CPAN command line tool (cpan DBD::mysql) or using apt-get (apt-get install libdbd-mysql-perl) it is installed in the library directories used by the system Perl (the one that is installed as part of your operating system). You can confirm that this has been installed correctly by running the following commands:
$ perldoc DBD::mysql
$ perl -MDBD::mysql -le'print $DBD::mysql::VERSION'
If DBD::mysql is installed correctly, the first command will show you the documentation for the module and the second will give the version number.
But, as I said, this is installed for use by the system Perl installation. It appears from the error message you're seeing that your Bitnami installation isn't using the system Perl. It is, instead, using a separate Perl installation which is installed in /opt/bitnami.
So you need to get DBD::mysql installed in the module library for this Perl installation. It's possible to ask cpan to install a module in a different directory, but I'd be wary about just installing stuff into Bitnami's directory tree. I strongly suspect that an installation step has been skipped far earlier in the process. If Bitnami needs to use MySQL from a Perl program and installs its own Perl distribution complete with its own module library, then it should either include DBD::mysql in its installation or provide clear instructions on how to install it.
My suggestion would be to carefully go over the installation instructions for Bitnami and see what they have to say about installing MySQL support. If that doesn't work, you should take this question to Bitnami's support channels.

Geant4 does not find Expat library

I'm trying to install Geant4 10.00 on Linux Mint 15. I have the unzipped geant4 file geant4.10.00.p01 in the directory I made:
/home/mickmau5/Geant4
along with the required build file geant4.10.00-build.
This site goes throught the installation process http://goo.gl/nzxpQG . I'm at the lengthy cmake command part and getting this error
mickmau5#linuxmint ~/Geant4/geant4.10.00-build $ cmake -DCMAKE_INSTALL_PREFIX=/home/mickmau5/Geant4/geant4.10.00.p01-install /home/mickmau5/Geant4/geant4.10.00.p01
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (message):
Could NOT find EXPAT (missing: EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-2.8/Modules/FindEXPAT.cmake:50 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/Modules/Geant4OptionalComponents.cmake:71 (find_package)
CMakeLists.txt:78 (include)
-- Configuring incomplete, errors occurred!
Seems like I ought to download some things.
Thanks for any help!
From the Geant4 documentation:
GEANT4_USE_SYSTEM_EXPAT (DEFAULT : ON)
If set to ON, build Geant4 with an external install of Expat. In this
case, the Expat headers and library will be searched for under the
standard system paths. If these are not sufficient to locate the
required Expat installation, see the Advanced EXPAT_INCLUDE_DIR and
EXPAT_LIBRARY options.
Whilst Expat is installed on the vast majority of systems, it may be
missing in certain instances. In these cases, simply switch this
option to OFF and Geant4 will build and use its internal version of
Expat.
REQUIRES : Expat library and headers.
I had the same problem and I could fix it by downloading the expat-devel library.
To install expat-devel package (dnf package manager):
dnf install expat-devel

Creating riak nodes: bitcask version clash

I have installed riak on a Fedora 17 system (but not using the package manager) by following the standard instructions, i.e.:
$ wget http://downloads.basho.com.s3-website-us-east-1.amazonaws.com/riak/1.2/1.2.1/riak-1.2.1.tar.gz
$ tar zxvf riak-1.2.1.tar.gz
$ cd riak-1.2.1
$ make all
This worked and I now tried to create four nodes as described in the Fast Track tutorial:
$ make devrel
This runs for a while and then produces the error below:
==> rel (generate)
ERROR: generate failed while processing /space/surechem/riak-1.2.1/rel: {'EXIT',{{badmatch,{error,"bitcask: Application version clash. Multiple directories contains version \"1.5.2\"."}},
[{rebar_reltool,generate,2,[]},
{rebar_core,run_modules,4,[]},
{rebar_core,execute,4,[]},
{rebar_core,process_dir,4,[]},
{rebar_core,process_commands,2,[]},
{rebar,main,1,[]},
{escript,run,2,[{file,"escript.erl"},{line,741}]},
{escript,start,1,[{file,"escript.erl"},{line,277}]}]}}
make: *** [dev1] Error 1
I have difficulties understanding what that error message is trying to tell me.
Is this a version conflict with bitcask? The Fedora package erlang-bitcask is installed on the machine (erlang-bitcask-1.5.2-1.fc17.x86_64). Should it be removed? Do I need a different version of it?
Indeed this seems to be caused by conflicts with Erlang packages installed in the system. After removing the erlang-bitcask package from the system, I got similar error messages for other packages. In the end I had to remove four packages,
$ sudo yum remove erlang-bitcask erlang-ebloom erlang-js erlang-luke
to get it to work.