protoc --version is not showing anything - c++

I installed protocol-buffers in C++ in my Ubuntu 14.04 LTS PC by following instructions provided at official GitHub page here.
There was no error reported during installation. However, I would like to verify the installation hence I run protoc --version but it returned following error message:
The program 'protoc' is currently not installed. You can install it by typing:
sudo apt-get install protobuf-compiler
I am wondering why it is behaving like this? Am I missing something obvious?
I want to generate CPP and header file for my protocol buffers message file as well.

Related

Cppcheck not recognizing Command

I got the following error on Ubuntu 16.04:
$ cppcheck --project=compile_commands.json
cppcheck: error: unrecognized command line option: "--project=compile_commands.json".
I already tried reinstalling cppcheck. Does anyone know to what this error is related?
cppcheck doesn't support the --project option on the version available by default on Ubuntu 16.04 (xenial). The version of cppcheck there is 1.72
If you wish to use the option --project then install a newer cppcheck.
It can be installed from the snap store (sudo snap install cppcheck).
It can be installed manually from cppcheck.net - download source, build locally
You can upgrade to ubuntu 18.04/20.04 and use the version from there.

Getting errro openssl/rsa.h: No such file or directory

I am using ubuntu and compiling gRPC but getting error on openssh:
gRPC/src/core/lib/security/credentials/jwt/json_token.h:25:25: fatal error: openssl/rsa.h: No such file or directory
my system have following openssh version:
OpenSSL 1.0.2h-fips 3 May 2016
Tried to install openssh using following command:
apt-get install libssl-dev
its give error command not found.
It seems apt-get command is not found in your system.
This might be helpful for you (apt-get: command not found).

AWS Linux Server install R package

I try to install the package "data.table" (and "aws.s3)" via Rstudio Server on an Amazon Linux instance following this guide:
http://stanke.co/category/r/
Unfortunately, I get the following error message. I really don't know what else to do.
Can anybody help? I installed devtools and I am able to install other packages such as xml2, devtools and deplyr.
I had the same issue on AWS and already fixed.
You need first install gcc64 and openmp shared support library.
sudo yum install gcc64
sudo yum install libgomp
Then under your user home create an .R folder with a Makevars file in it, with the following content (it will tell to R which compiler to use):
CC = /usr/bin/gcc64
CXX = /usr/bin/g++
SHLIB_OPENMP_CFLAGS = -fopenmp
I hope it's working for you as well ...
You need to install dmlc-core.
This link will provide more information:
A common bricks library for building scalable and portable distributed machine learning
based on https://github.com/RcppCore/RcppArmadillo/issues/200, I think this issue is due to a g++ compatability issue. It might also explain why when I installed devtools it kept giving me [-Wdeprecated-declarations]
so run:
sudo yum remove gcc72-c++.x86_64 libgcc72.x86_64
yum install R-devel
Then you should be able to run the installation command.

Building a Docker file

I am trying to reproduce my development environment in a docker image. I am able to get simple dependencies met such as python+a couple standard packages, largely through the builds from docker hub. But when it comes to installing xgboost or pandas I am having great difficulty.
After looking into the error messages it looked like I had the wrong version of g++ installed. The build had 4.7, but xgboost requires 4.9+. As I tried to update g++ I kept running into a wall where I couldn't update g++ because I needed another package (apt-add-repository), but to install that package I needed another (apt-utils) etc.
Does anyone have any general advice with setting up a Docker image or for this specific problem of upgrading the g++.
Here is the Docker file:
FROM continuumio/anaconda
MAINTAINER maintainer
RUN apt-get install -y g++-4.9
One test would be to start from a gcc:4.9 image (which uses wheezy), and try to add what anaconda Dockerfile does.
That way, you start from an image with the right gcc.
You first need to make sure your source list is up-to-date. The line with RUN command in the dockerfile should be
RUN apt-get update && apt-get install -y g++

How to install pgdb on MacOS Yosemite?

On Mavericks, I downloaded the source code and and built and installed it with Distutils as I explained on Stackoverflow.
I try to reproduce it on Yosemite and I have the following error message:
Exception: pg_config tool is not available.
The command in 'setup.py' that generates the problem is supposed to "Retrieve information about installed version of PostgreSQL."
f = os.popen('pg_config --%s' % s
I used the graphic installer to install PostgreSQL on my computer.
The graphic installer did not work. By using Homebrew to install PostgreSQL, everything worked fine.
brew install postgresql