make all fatal error, when i am compiling Makefile - installation

I am getting error as shown below while running make all command.
fatal error: google/protobuf/arena.h: No such file or directory
compilation terminated.

cd ~/caffe
sudo make clean
sudo apt-get install libboost-all-dev
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler
pip install protobuf
sudo make all
sudo make test
sudo make runtest

Either you don't have protobuf installed or it is outdated. To install, run the following command
sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler
In case it is outdated, you need to compile protobuf from the source.

Related

configure: error: cannot find libz

Building Mesos 1.3.0 from sources on linux-mint release 18.2 I get the following message:
configure: error: cannot find libz
When I try to search packages starts with libz* I get many packages names starting with libz. Which one is the right package I should install it?
Try installing zlib1g-dev. It's listed in the documentation
Linux Mint 18.2 is based on Ubuntu 16.04.
So, you should follow instructions for Ubuntu
16.04.
# Update the packages.
$ sudo apt-get update
# Install a few utility tools.
$ sudo apt-get install -y tar wget git
# Install the latest OpenJDK.
$ sudo apt-get install -y openjdk-8-jdk
# Install autotools (Only necessary if building from git repository).
$ sudo apt-get install -y autoconf libtool
# Install other Mesos dependencies.
$ sudo apt-get -y install build-essential python-dev python-six python-virtualenv libcurl4-nss-dev libsasl2-dev libsasl2-modules maven libapr1-dev libsvn-dev zlib1g-dev

pip3 installs inside virtual environment with python3.6 failing due to ssl module not available

(py36venv) vagrant#pvagrant-dev-vm:/vagrant/venvs$ pip3 install pep8
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pep8 Could not fetch URL
https://pypi.python.org/simple/pep8/: There was a problem confirming
the ssl certificate: Can't connect to HTTPS URL because the SSL module
is not available. - skipping
Could not find a version that satisfies the requirement pep8 (from
versions: ) No matching distribution found for pep8
Background information - Trying to move to python 3.6.
Installed python3.6 using the below commands:
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar -xvf Python-3.6.0.tgz
cd Python-3.6.0
./configure --enable-optimizations
make -j8 sudo
make altinstall python3.6
Created virtualenv by:
python3.6 -m venv py36venv
source py36venv/bin/activate
Tried to install pep8
(py36venv) pip3 install pep8
pip is configured with locations that require TLS/SSL, however the ssl
module in Python is not available.
Collecting pep8
Could not fetch URL https://pypi.python.org/simple/pep8/: There was a problem
confirming the ssl certificate: Can't connect to HTTPS URL because the
SSL module is not available. - skipping Could not find a version
that satisfies the requirement pep8 (from versions: ) No matching
distribution found for pep8
I followed the below steps for python3.6 installation in ubuntu 14.04 and virtualenv pip installs works fine.
Python 3.6 Installation:
sudo apt-get install python3-dev libffi-dev libssl-dev
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar xvf Python-3.6.0.tgz
cd Python-3.6.0
./configure --enable-optimizations
make -j8
sudo make altinstall
python3.6
If seeing the following error --
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [altinstall] Error 1
try:
sudo apt-get install zlib1g-dev
Validation:
Create virtualenv in python3.6:
python3.6 -m venv testenv
source testenv/bin/activate
pip install pep8
using pip:
(testenv) vagrant#pvagrant-dev-vm:~$ pip install pep8
*Collecting pep8
Downloading pep8-1.7.0-py2.py3-none-any.whl (41kB)
100% |████████████████████████████████| 51kB 4.1MB/s
Installing collected packages: pep8
Successfully installed pep8-1.7.0*
(testenv) vagrant#pvagrant-dev-vm:~$ pip list
pep8 (1.7.0)
pip (9.0.1)
setuptools (28.8.0)
I stumbled upon the same issue when I tried to create a virtual environment utilising python3.6.0. Here is my solution for Mac OS X 10.12.2 (Py_minion comment was pretty close):
Setup
I created the environment by the following steps:
downloading python3.6.0
running
./configure --prefix=<some_path>`
make
make install
mkvirtualenv --python=<some_path/bin/python3.6> foo
So basically similar to: https://stackoverflow.com/a/11301911/1286093
An indication if you have the same issue as I had would be a similar line when running make
The necessary bits to build these optional modules were not found: _ssl
Solution
Install openssl
brew install openssl
brew unlink openssl && brew link openssl --force
Change Module/Setup or Module/Setup.dist
You can find those files in the directory of the downloaded Python version.
Comment in and, if necessary change, lines 209 - 211 (I had to change the SSL variable to my openssl location).
SSL=/usr/local/opt/openssl <---- THIS DEPENDS ON YOUR INSTALLATION
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
Given that this was the location of openssl
Set environment variables
export CFLAGS="-I$(brew --prefix openssl)/include"
export LDFLAGS="-L$(brew --prefix openssl)/lib"
make and install again
Running
./configure --prefix=<some_path>`
make
make install
mkvirtualenv --python=<some_path/bin/python3.6> foo
again did the trick for me
Running make reported to me in the shell output:
The necessary bits to build these optional modules were not found:
_bz2 _dbm _gdbm
_sqlite3 _ssl _tkinter
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
What solved the problem in my case (Linux Mint 18.1, openssl already installed) was editing the setup.py in the Python-3.6.0 folder adding there the path to where the openssl installation put the ssl.h file on my system into ( /usr/include/openssl/ssl.h ). Here the section in which I have added the line '/usr/include':
# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
'/usr/local/ssl/include/',
'/usr/contrib/ssl/include/',
'/usr/include/'
]
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
search_for_ssl_incs_in
)
I have solved this problem on Ubuntu-16.04.1.
First you need to install necessary libraries. To install open Terminal (Ctrl+Alt+T), then type;
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
After that go the directory where your python file is then reconfigure and reinstall python3.6 .
cd /opt/Python3.6/
./configure
make
sudo make install
NOTE
If you installed Python3.6 via ppa, then reinstall it again;
sudo apt-get install python3.6
Now you should be able to use pip3.6
I ran into the same error when building Python 3.6.1 from source under CentOS 7.
For CentOS7, I had to first:
sudo yum install openssl-dev
Then:
./configure --enable-optimizations
make altinstall
Now pip3.6 works :-)
A complete script can be found HERE
Install Prerequisites
For RHEL/CentOS
sudo yum -y install gcc gcc-c++ zlib zlib-devel libffi-devel openssl-devel wget
For Ubuntu/Debian
sudo apt-get -y install build-essential python-dev python-setuptools python-pip
python-smbus libncursesw5-dev libgdbm-dev libc6-dev zlib1g-dev libsqlite3-dev
tk-dev libssl-dev openssl libffi-dev wget
Download Python
Modify for the version of python you want
Python Versions
cd /var/tmp
sudo wget https://www.python.org/ftp/python/3.x.x/Python-x.x.x.tgz
sudo tar xf Python-3.*.tgz
cd Python-3*
Configure/Make/Install
sudo ./configure --enable-optimizations --enable-shared --prefix=/usr/local
sudo make && make altinstall
Cleanup Shared Library & Add to Path
Stripping the shared library of debugging symbols can speed up execution when running parallel scripts.
sudo make && make altinstall
sudo strip /usr/local/lib/libpython3.7m.so.1.0
sudo echo 'export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib' >> /etc/profile.d/python.sh
sudo echo 'export PATH=${PATH}:~/usr/local/bin/' >> /etc/profile.d/python.sh
sudo echo '/usr/local/lib' >> /etc/ld.so.conf
sudo ldconfig
Reference
Gist
Stack Overflow
Stack Overflow
Daniel Erikson
Unix StackExchange
TLDP

Error in invoking target 'links proc gen_pcscfg' of makefile oracle error in ubuntu

I am using Ubuntu 15.04, I am trying to install Oracle 11G.
before installing the Oracle I have install all the package mention bellow.
sudo apt-get install libaio1
sudo apt-get install libaio-dev
sudo apt-get install unixODBC
sudo apt-get install unixODBC-dev
sudo apt-get install expat
sudo apt-get install sysstat
sudo apt-get install libelf-dev
sudo apt-get install elfutils
sudo apt-get install lsb-cxx
sudo apt-get install pdksh
sudo apt-get install libstdc++5
sudo apt-get install ia32-libs
sudo apt-get install ksh
sudo apt-get install lesstif2
sudo apt-get install alien
sudo apt-get install gcc
sudo apt-get install gawk
sudo apt-get install binutils
sudo apt-get install gawk
sudo apt-get install x11-utils
sudo apt-get install rpm
sudo apt-get install alien
sudo apt-get install lsb-rpm
sudo apt-get install libmotif3
sudo apt-get install lesstif2
sudo apt-get install openssh-server
While installing Oracle I am getting this error
LOG Errors
INFO: /usr/bin/ld: cannot find -lclntsh
/usr/bin/ld: cannot find /usr/lib64/libpthread_nonshared.a inside
INFO: collect2: error: ld returned 1 exit status
INFO: /home/varun/app/varun/product/11.2.0/dbhome_1/plsql/lib/ins_plsql.mk:33: recipe for target 'wrap' failed
INFO: make: *** [wrap] Error 1
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'install' of makefile '/home/varun/app/varun/product/11.2.0/dbhome_1/plsql/lib/ins_plsql.mk'. See '/home/varun/app/oraInventory/logs/installActions2015-08-27_11-31-03PM.log' for details.
Exception Severity: 1
I really dont have idea how do I resolve this. Searched lot on the net but could not find solution. Does any body have idea how do I FIXED IT
This is an unsupported linux release for oracle 11g. You are pretty much on your own to get this to work. Otherwise check the oracle linux installation guide for supported linux versions and distributions (they are generally redhat based).

cc1plus: error: unrecognized command line option ‘-std=c++11’ Ubuntu gcc 4.7

I am trying to compile some c++11 code on ubuntu 12.04. After invoking my makefile I got
cc1plus: error: unrecognized command line option ‘-std=c++11’
Ubuntu gcc 4.7. Fine, so I ran
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.7
Ran it again, and still the same problem. Great.So then I tried changing the symlink of gcc from gcc4.6 to 4.7. After doing this, it then went and complained about not being able to find g++. So I then ran
sudo apt-get update
sudo apt-get install build-essential
Still no luck. When I typed g++, I just got
The program 'g++' can be found in the following packages:
*g++
*pentium_builder
Try: sudo apt-get install <selected package>
So I then tried
sudo apt-get install pentium_builder
Now I get
Unable to exec g++.real: No such file or directory
How I can compile c++11 code?
Last time I tried, the following worked for me for installing and setting g++ 4.8 as default:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
sudo apt-get install g++-4.8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
It seemed painless, and I was able to choose which gcc/g++ version to use without manually setting up symlinks. I suspect this would work for gcc 4.7 as well.
Add the following to your Makefile:
PROJECT_CFLAGS = -std=c++0x

how to install apt-get, raspbian

I am doing host target development within scratchbox. And apt-get is not installed in my target raspbian rootfile system.
What is the right apt-get package to use from here for raspbian ?
http://www.apt-get.org/main/
Should i use wget command for .deb package of apt-get ?
http://www.cyberciti.biz/tips/linux-wget-your-ultimate-command-line-downloader.html
http://www.thegeekstuff.com/2009/09/the-ultimate-wget-download-guide-with-15-awesome-examples/#more-1885
dpkg is installed in root filesystem of my target, i have checked it using whereis command
Please suggest, or can you suggest some link for installing apt-get itself. I am not able to find something related to it.
Any reply will be appreciable.
Looks like maybe debian apt package will get you there. I thought apt was just ubuntu but no.
The Raspbian FAQ is here: http://www.raspbian.org/RaspbianFAQ
In it you can grab a list of apps included in Rasbian:
http://archive.raspbian.org/raspbian/dists/wheezy/main/binary-armhf/Packages
You can grab the Raspbian package archive here:
http://archive.raspbian.org/raspbian/dists/wheezy/main/binary-armhf/Packages.gz
Extract it, then use dpkg to install apt-get.
Install Putty.exe and login with putty to your raspbian with ip-adress of your raspbian and you can install apt-get!
Install the following:
sudo apt-get update;
sudo apt-get install gcc;
sudo apt-get install autoconf;
sudo apt-get install libtool;
sudo apt-get install pkg-config;
sudo apt-get install libselinux1-dev;
sudo apt-get install liblockdev1-dev;
sudo apt-get install gawk;
sudo apt-get install g++;
sudo apt-get install c++;
sudo apt-get install libgudev-1.0-dev;
sudo apt-get install libudev-dev;
mkdir -p $HOME/distr/libcec;
wget -P $HOME/distr/libcec https://github.com/Pulse-Eight/libcec/archive/master.zip;
unzip $HOME/distr/libcec/master.zip -d $HOME/distr/libcec/;
cd $HOME/distr/libcec/libcec-master ./bootstrap;"
./configure --with-rpi-include-path=/opt/vc/include --with-rpi-lib-path=/opt/vc/lib --enable-rpi;
make;
sudo make install;
sudo apt-get install cec-utils;
sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
sudo reboot
After the reboot, is everything up-to-date and you have no problems anymore!

Resources