error in installing apache libtool not found - apache

I am installing the apache steps are as followecho deb http ://ports.ubuntu.com/ubuntu-ports vivid restricted main multiverse universe >> /etc/apt/sources.list
apt-get install -y git \
openssl \
subversion \
autoconf \
libtool \
libapr \
libapr-util \
make \
libpcre3-dev \
libpcre++-dev \
libxml2-dev \
libexpat1-dev \
python
git clone https ://github.com/apache/httpd.git
cd httpd
svn co http: //svn.apache.org/repos/asf/apr/apr/trunk srclib/apr && cd srclib/apr && ./buildconf && ./build libtool && make && make install
The ./buildconf is giving error as follow
./buildconf
found apr source: srclib/apr
rebuilding srclib/apr/configure
buildconf: checking installation...
buildconf: python version 2.7.9 (ok)
buildconf: autoconf version 2.69 (ok)
buildconf: libtool not found.
You need libtool version 1.4 or newer installed
to build APR from SVN.
./buildconf failed for apr
In above as i have already installed libtool. But the libttol is not found.when i say apt-get install -y libtool i get message as # apt-get install -y libtoo
apt-get install -y libtool
Reading package lists... Done
Building dependency tree
Reading state information... Done
libtool is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
W: Duplicate sources.list entry http://ports.ubuntu.com/ubuntu-ports/ vivid/restricted ppc64el Packages (/var/lib/apt/lists/ports.ubuntu.com_ubuntu-ports_dists_vivid_restricted_binary-ppc64el_Packages)
W: Duplicate sources.list entry http://ports.ubuntu.com/ubuntu-ports/ vivid/main ppc64el Packages (/var/lib/apt/lists/ports.ubuntu.com_ubuntu-ports_dists_vivid_main_binary-ppc64el_Packages)
W: You may want to run apt-get update to correct these problems
but when i try commands i get $libtool
bash: libtool: command not found
$man libtool
bash: man: command not found
$libttol --help
bash: libttol: command not found
$libtool --version
bash: libtool: command not found

In Ubuntu vivid, /usr/bin/libtool is provided by the libtool-bin package, not by the libtool package. Install libtool-bin:
apt-get update
apt-get install -y libtool-bin

Related

How to make bazel generate temporary static libs when bazel build //

I'm using bazel to build tensorflow and tensorflow/serving, usually when I built tensorflow/serving with bazel, bazel generated some static library in bazel-bin/tensorflow_serving/core/ for me.
for example, after I successfully built tensorflow/serving, I got bazel-bin/tensorflow_serving/core/libaspired_version_policy.a and so on.
But things changed when building tensorflow/serving on another docker instance, under bazel-bin/tensorflow_serving/core/ I only got _objs, no static libraries anymore, how come?
What should I do to get these static libraries?
Here is my Dockerfile:
FROM tensorflow/tensorflow:1.15.5-py3
LABEL version="1.0.0"
WORKDIR /root/
ENV TMP=/tmp
RUN export https_proxy=http://220.181.102.178:8118 && \
export http_proxy=http://220.181.102.178:8118
RUN ln -s /usr/local/bin/gfortran /usr/bin/gfortran
RUN apt-get update -yq ; exit 0
RUN apt-get install -yq software-properties-common apt-utils && apt-get update -yq; exit 0
RUN apt-get install -yq vim tree clang gdb make git
RUN apt-get install -yq automake bison flex libboost-all-dev libevent-dev
RUN apt-get install -yq libssl-dev ssh libtool pkg-config
RUN apt-get install -yq default-jdk default-jre libunwind8-dev libc-ares-dev
RUN apt-get install -yq python-numpy python-future libleveldb-dev libsnappy-dev libgoogle-perftools-dev
RUN apt-get install -yq librdkafka-dev libapr1-dev libaprutil1-dev texinfo unzip zip
RUN unset TF_NEED_CUDA
## To install go, uncomment below
#RUN add-apt-repository ppa:longsleep/golang-backports -y
#RUN apt-get install -yq golang-go
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y
RUN apt-get install -yq gcc-8 g++-8
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 \
--slave /usr/bin/g++ g++ /usr/bin/g++-8 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-8 \
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-8 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-8
RUN export https_proxy=http://220.181.102.178:8118 && wget https://github.com/Kitware/CMake/releases/download/v3.18.5/cmake-3.18.5-Linux-x86_64.sh && \
bash cmake-3.18.5-Linux-x86_64.sh --prefix=/usr/ --skip-license && \
rm -rf cmake-3.18.5-Linux-x86_64.sh
RUN export https_proxy=http://220.181.102.178:8118 && wget https://github.com/bazelbuild/bazel/releases/download/0.24.1/bazel-0.24.1-installer-linux-x86_64.sh && \
bash bazel-0.24.1-installer-linux-x86_64.sh && rm -rf bazel-0.24.1-installer-linux-x86_64.sh
RUN mkdir .ssh/
ADD .ssh/ .ssh/
ADD .vimrc .
ADD .bashrc .
RUN export PATH=/usr/local/cuda/bin:$PATH && export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/lib:/lib64:/usr/lib:/usr/lib64:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH
RUN git config --global credential.helper store
bazel version : 0.24.1
tensorflow/serving version : 1.15.0 downloaded from github release page.
build command :
export https_proxy=http://10.130.48.179:3128
unset TF_NEED_CUDA
# Build tensorflow_model_server
bazel build -c opt --copt=-msse4.1 --copt=-msse4.2 --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-O3 --copt=-march=native --cxxopt="-fexceptions" --verbose_failures //tensorflow_serving/model_servers:tensorflow_model_server
Please help. thanks.
To build //tensorflow_serving/model_servers:tensorflow_model_server the Bazel need only *.o files. Making static libraries would be wasteful, because they are not needed by that cc_binary rule. Use //tensorflow_serving/core:aspired_version_policy to build that specific library, or just use //... to build everything in the workspace
Put linkstatic=0 in every cc_library call and this should be enough to force bazel to create static libs for every cc_library.

How can I install Tensorflow GPU with latest version of CUDA and cuDNN

Installing TensorFlow for object detection is annoying sometimes, especially when wired errors happen after starting one's own object detection project by finetuning pre-trained model.
How to install latest Tensorflow GPU support and latest CUDA/CUDNN without any error?
To install tensorflow-gpu object detection api on Ubuntu 16.04
upgrade system
sudo apt-get update
sudo apt-get upgrade
install basic packages
sudo apt-get install vim curl python-dev gnupg-curl python-tk git
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo -H python get-pip.py
install tensorflow-gpu (tensorflow version=1.14)
sudo -H pip install tensorflow-gpu
install CUDA (Final CUDA version = 10.1)
// Please turn off your secure boot from BIOS
sudo apt-get install gnupg-curl
// Here we install version 10.0 to avoid other issues. Later we can upgrade it to version 10.1
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_10.0.130-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
sudo apt-get update
install cuDNN (cuDNN version = 7.6.3.30-1, compatible to CUDA 10.1)
sudo apt-get install --no-install-recommends cuda-10-0
// restart your computer here
nvidia-smi.
sudo apt-get install --no-install-recommends libcudnn7=7.6.3.30-1+cuda10.0 libcudnn7-dev=7.6.3.30-1+cuda10.0
sudo apt-get install -y --no-install-recommends libnvinfer5=5.1.5-1+cuda10.0 libnvinfer-dev=5.1.5-1+cuda10.0
sudo apt-get update
// this upgrade command will upgrade your CUDA to version 10.1
sudo apt-get upgrade
sudo apt-get autoremove
install Tensorflow object detection api
sudo -H pip install Cython
sudo -H pip install contextlib2
sudo -H pip install pillow
sudo -H pip install lxml
sudo -H pip install jupyter
sudo -H pip install matplotlib
mkdir tensorflow
cd tensorflow
git clone https://github.com/tensorflow/models
// install protocbuf version 3.0.0
wget -O protobuf.zip https://github.com/google/protobuf/releases/download/v3.0.0/protoc-3.0.0-linux-x86_64.zip
unzip protobuf.zip
sudo cp ./bin/protoc /bin/
sudo cp -r ./include/google /usr/local/include/
cd tensorflow/models/research
protoc object_detection/protos/*.proto --python_out=.
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
make
cp -r pycocotools <path_to_tensorflow>/models/research/
Export Environment
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.1/lib64
export PYTHONPATH=$PYTHONPATH:~/tensorflow/models/research:~/tensorflow/models/research/object_detection/slim
Other
If we install CUDA 10.1 it may have a compatibility issue that libxxxx.so.10.0 is not found when you start training your project.
To solve them:
a. sudo ln -s /usr/lib/x86_64-linux-gnu/libcublas.so.10.1 /usr/local/cuda-10.1/lib64/libcublas.so.10.0
b. sudo ln -s /usr/local/cuda-10.1/lib64/libcudart.so.10.1 /usr/local/cuda-10.1/lib64/libcudart.so.10.0
c. sudo ln -s /usr/local/cuda-10.1/lib64/libcufft.so.10 /usr/local/cuda-10.1/lib64/libcufft.so.10.0
d. sudo ln -s /usr/local/cuda-10.1/lib64/libcurand.so.10 /usr/local/cuda-10.1/lib64/libcurand.so.10.0
e. sudo ln -s /usr/local/cuda-10.1/lib64/libcusolver.so.10 /usr/local/cuda-10.1/lib64/libcusolver.so.10.0
f. sudo ln -s /usr/local/cuda-10.1/lib64/libcusparse.so.10 /usr/local/cuda-10.1/lib64/libcusparse.so.10.0
All Set

Watchman installation error

I started installing all I need according to react-native Get Started guide.
I installed Watchman and according to there guide.
I got following error while running ./configure command.
arafath#dell-pc:~/watchman$ ./configure
bash: ./configure: No such file or directory
OS - UBUNTU 16.04
I have succeeded in installing following things.
sudo apt-get install -y autoconf automake build-essential python-dev libssl-dev libtool

gem install pg only works as sudo

I have read a lot on this topic, but seems like nobody has had the exact problem I am having.
I am trying to install Postgres support for Rails 3 on Ubuntu. If I run:
sudo gem install pg
everything works fine.
However, I am using GemFile and trying to deploy my application to Heroku, so doing:
bundle install
As part of the bundle install it fails when doing gem install pg with the following error:
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.9/usr/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /Library/PostgreSQL/9.1/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
Any ideas why this is happening. Surely it would also fail to install as sudo if I do not have the correct libraries installed. Is this some kind of permissions problem?
Thanks for your help in advance,
Olli
I believe you need to install libpq. Please try:
sudo apt-get install libpq-dev
And btw, this may be a helpful hint for you. I usually setup my development environment using this chain (this is valid for Ubuntu 12.04 LTS):
sudo apt-get install libpq-dev build-essential openssl libreadline6 libreadline6-dev curl zlib1g \
zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev \
autoconf libc6-dev ncurses-dev automake libtool bison subversion ncurses-term \
exuberant-ctags libnotify-bin curl autoconf make automake ssh git-core git-doc imagemagick libpq-dev vim \
libreadline5 libmysqlclient-dev imagemagick libmagick+5 \
libmagick++-dev libmagickwand4 libmagickcore4 libmagickcore4-extra libmagickcore-dev \
libmagickwand-dev \
tmux libcurl4-openssl-dev \
libsqlite3-0 libsqlite3-dev sqlite3 postgresql-contrib mysql-server memcached \
gimp chromium-browser chromium-codecs-ffmpeg-extra chromium-browser-inspector \
bind9 terminator libqt4-dev xvfb gitk postgresql pgadmin3 rar unrar\
ubuntu-restricted-extras vlc compizconfig-settings-manager gstreamer0.10-plugins-ugly flashplugin-installer

Error with apr-util while installing httpd 2.4.1 on centos

I am trying to install httpd-2.4.1 on my CentOS machine (it has 2.2.15 currently). I did the following...
sudo yum install gcc
sudo yum install perl
sudo yum install libbz2 libbz2-devel
sudo yum install bzip2-devel
sudo yum install curl-devel
sudo yum install libjpeg-devel
sudo yum install libpng-devel
sudo yum install libX11-devel gd-devel
sudo yum install libc-client-devel
sudo yum install libmcrypt-devel
sudo yum install bzip2
sudo yum install pcre-devel
sudo yum install openssl-devel
sudo yum install libxml2-devel
sudo yum install libmcrypt
#apache
wget http://mirror.nus.edu.sg/apache//apr/apr-util-1.4.1.tar.gz
wget http://mirror.nus.edu.sg/apache//apr/apr-1.4.6.tar.gz
extract and move to /srclib in httpd-2.4.1 directory
sudo ./configure --prefix=/usr/local/apache --enable-so --enable-mods-shared=most --with-included-apr --with-included-apr-util --enable-load-all-modules
sudo make
sudo make install
And here I get the error:
/usr/bin/ld: /usr/local/apache/lib/libexpat.a(xmlparse.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/local/apache/lib/libexpat.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
libtool: install: error: relink `libaprutil-1.la' with the above command before installing it
How do I relink libaprutil-1.la with the above command? (i am guessing it refers to -fPIC?)
You didn't include --with-included-apr-util while running ./configure
./configure --with-included-apr --with-included-apr-util