./configure: error: the HTTP gzip module requires the zlib library - meteor

I am new to dockers/containers.
I am trying to run a fork with a fix I have put in for openSSL vulnerability of mup-frontend using the following command:
docker build ./
It compiles to a point then errors with
./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.
I am running a mac so installed zlib with brew. I have searched long and hard but cannot find much on this error.
Because of this error it also fails to build on automation in docker.io

The Dockerfile you reference at
https://github.com/meteorhacks/mup-frontend-server/blob/master/Dockerfile
starts with
FROM debian
so you will need to have such a line in your Dockerfile, before the place where you need zlib
RUN apt-get update && apt-get install -y \
zlib \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
in one RUN, you update, install and clean

yum install -y httpd-devel pcre perl pcre-devel zlib zlib-devel GeoIP GeoIP-devel
Download required packages
cd
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.gz
wget http://zlib.net/zlib-1.2.5.tar.gz
wget ftp://ftp.openssl.org/source/openssl-0.9.8o.tar.gz
Now you have to untar these files.
tar -xvf zlib-1.2.5.tar.gz
tar -xvf pcre-8.10.tar.gz
tar -xvf openssl-0.9.8o.tar.gz

Related

How to install R from tar gz file

I have R in 3.6.3 version and I want to download 4.0.0 version. I downloaded from https://cran.r-project.org/src/base/R-4/ tar gz file but I have no idea how can I install it. Could you please give me a command which can install this R version from tar gz file ?
Install R from Source on Linux
You can find a detailed description for a range of different Linux systems here.
In short, you will need to run the following chain of commands:
First to install dependencies. This will depend on your Linux distribution. For Linux Mint, you can do
sudo apt-get build-dep r-base
Then, specify your desired R version
export R_VERSION=4.2.1
In a folder of your choice, download the .tar.gz (For versions other than 4.X, you may need to adjust the link)
curl -O https://cran.rstudio.com/src/base/R-4/R-${R_VERSION}.tar.gz
tar -xzvf R-${R_VERSION}.tar.gz
cd R-${R_VERSION}
To build and install, run from the same shell
./configure \
--prefix=/opt/R/${R_VERSION} \
--enable-memory-profiling \
--enable-R-shlib \
--with-blas \
--with-lapack
make
sudo make install
In case the ./configure ... step does not work out, you may need to install the missing binaries individually by hand.
You can check the installation by running
/opt/R/${R_VERSION}/bin/R --version
and create a symlink
sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R
sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript
Done!
Your R installation will be in
/opt/R/${R_VERSION}

Qt Creator - The selected build of GDB does not support Python scripting

I use a cross-compiled Qt setup on a CentOS host. Developing Qt applications and executing them remotely on the Raspberry Pi works fine. But I got the following error when I try to debug the application:
I use the standard GDB from the official Raspberry Pi toolchain (tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gdb).
So what is wrong? Why does the GDB needs Python scripting when I use C++?
I usually build GDB from source, so you can configure it to include Python support:
First some dependencies:
yum install -y texinfo gcc gcc-c++ make python3-devel wget
Then build and install GDB itself:
target=arm-linux-gnueabihf
version=9.1
# Download and extract
cd /tmp
[ -e gdb-$version.tar.xz ] || wget https://ftp.gnu.org/gnu/gdb/gdb-$version.tar.xz
rm -rf gdb-$version
tar xf gdb-$version.tar.xz
mkdir -p gdb-$version/build
cd gdb-$version/build
# Get the Python executable and library directory
[ -z "${PYTHON}" ] && export PYTHON=python3
PYTHON_LIBDIR=$("${PYTHON}" -c \
"import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
# Configure GDB
../configure \
--prefix="$HOME/.local" \
--target=$target \
--with-python="${PYTHON}" \
LDFLAGS="-L${PYTHON_LIBDIR}"
# Build and install GDB
make -j$(nproc)
make -C gdb install
GDB will be installed in ~/.local/bin, so add it to your path if you haven't already.
You can run this command in your terminal to install gdb
sudo apt-get install gdb

How to make wkhtmltopdf work in Odoo v10 on Debian 9 "Stretch"?

I know from the Odoo website that Odoo needs an special wkhtmltopdf version:
Danger
to print PDF reports, you must install wkhtmltopdf yourself: the version of wkhtmltopdf available in debian repositories does not support headers and footers so it can not be installed automatically. The recommended version is 0.12.1 and is available on the wkhtmltopdf download page, in the archive section. As there is no official release for Debian Jessie, you can find ours on the extra section of our nightly server.
So, it is possible to install the library on Debian Jessie because there is an extraofficial version with qt patched.
If I use the wkhtmltopdf for Debian Jessie in Debian Stretch, the library is not working.
If I install wkhtmltopdf using sudo apt-get install wkhtmltopdf I get this warning when I try to print any report:
Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.No protocol specified
QXcbConnection: Could not connect to display
Is there any other way to install wkhtmltopdf for Odoo in Debian Stretch?
Is there any other available version for Odoo 10 and Debian Stretch?
Update
I have found this Git Hub issue. It seems it is not available yet
Update (2019/02/28)
I found this wiki where Odoo Developers say the version 0.12.5-1 is recommended for Odoo 10 and later
I have read this on a Git Hub Issue. The writer seems one developer of Wkhtmltopdf:
Currently working on a reworked packaging system in the wkhtmltopdf/packaging repository, you can download preview builds for linux. Will create something for 0.12.1 if required, would appreciate fixing any issues with odoo before the 0.12.5 release.
wkhtmltox_0.12.1.3-1~stretch_amd64.deb
wkhtmltox_0.12.1.3-1~stretch_i386.deb
The solution below worked:
Download libssl and libpng from debian repo and install
wget http://ftp.fr.debian.org/debian/pool/main/libp/libpng/libpng12-0_1.2.49-1+deb7u2_amd64.deb
wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u8_amd64.deb
dpkg -i libssl1.0.0_1.0.1t-1+deb8u8_amd64.deb
dpkg -i libpng12-0_1.2.49-1+deb7u2_amd64.deb
Then download wkhtmltopdf and install :
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.2.1/wkhtmltox-0.12.2.1_linux-jessie-amd64.deb17
dpkg -i wkhtmltox-0.12.2.1_linux-jessie-amd64.deb
Then add symlink:
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
It It hapened to me when I tried to use it in Ubuntu, I had to download the source and compile it, check this solution from a github issue, there is a solution by compiling the wkhtmltopdf source and eventually (if it's not doen) qt :
Source :
https://github.com/OCA/account-financial-reporting/issues/33
It's likely that you'll have to manually compile the latest version of
wkhtmltopdf and qt:
Remove wkhtmltopdf and related package
$ sudo apt-get remove libqt4-dev qt4-dev-tools wkhtmltopdf
$ sudo apt-get autoremove
Install requirement package for compiling
$ sudo apt-get install openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y
Clone from git wkhtmltopdf and qt source
$ git clone git://github.com/wkhtmltopdf/wkhtmltopdf.git wkhtmltopdf
$ mkdir qt-wkhtmltopdf && cd qt-wkhtmltopdf
$ git clone https://www.github.com/wkhtmltopdf/qt --depth 1 --branch wk_4.8.7 --single-branch .
Compile qt
$ sudo ./configure -nomake tools,examples,demos,docs,translations -opensource -prefix "`pwd`" `cat ../wkhtmltopdf/static_qt_conf_base ../wkhtmltopdf/static_qt_conf_linux | sed -re '/^#/ d' | tr '\n' ' '`
$ sudo make -j3
$ sudo make install
Compile wkhtmltopdf
$ cd ../wkhtmltopdf
$ sudo ../qt-wkhtmltopdf/bin/qmake
$ sudo make -j3
$ sudo make install Reboot
$ sudo reboot

getting "pygpu was configured but could not be imported" error while trying with OpenCL+Theano on AMD Radeon

I have followed the instructions from this:
https://gist.github.com/jarutis/ff28bca8cfb9ce0c8b1a
But then when I tried : THEANO_FLAGS=device=opencl0:0 python test.py
on the test file I am getting error:
ERROR (theano.sandbox.gpuarray): pygpu was configured but could not be imported
Traceback (most recent call last):
File "/home/mesayantan/.local/lib/python2.7/site-packages/theano/sandbox/gpuarray/init.py", line 20, in
import pygpu
File "/usr/src/gtest/clBLAS/build/libgpuarray/pygpu/init.py", line 7, in
from . import gpuarray, elemwise, reduction
File "/usr/src/gtest/clBLAS/build/libgpuarray/pygpu/elemwise.py", line 3, in
from .dtypes import dtype_to_ctype, get_common_dtype
File "/usr/src/gtest/clBLAS/build/libgpuarray/pygpu/dtypes.py", line 6, in
from . import gpuarray
ImportError: cannot import name gpuarray
I do not have good idea. I am using all these for the first time. I am working on Ubuntu 14.04 LTS. How can I resolve this error?
I fixed this issue with the step-by-step installation given in the lipgpuarray website!
Download
git clone https://github.com/Theano/libgpuarray.git
cd libgpuarray
Install libgpuarray
# extract or clone the source to <dir>
cd <dir>
mkdir Build
cd Build
# you can pass -DCMAKE_INSTALL_PREFIX=/path/to/somewhere to install to an alternate location
cmake .. -DCMAKE_BUILD_TYPE=Release # or Debug if you are investigating a crash
make
make install
cd ..
Install pygpu
# This must be done after libgpuarray is installed as per instructions above.
python setup.py build
python setup.py install
Source:
http://deeplearning.net/software/libgpuarray/installation.html
This worked for me!
Good Luck
Installing the blas library seems enough. I'm doing tests for the same problem.
cd ~
git clone https://github.com/clMathLibraries/clBLAS.git
cd clBLAS/
mkdir build
cd build/
sudo apt-cache search openblas
sudo apt-get install libopenblas-base libopenblas-dev
sudo apt-get install liblapack3gf liblapack-doc liblapack-dev
cmake ../src
make
sudo make install
And after that
git clone https://github.com/Theano/libgpuarray.git
cd libgpuarray
mkdir Build
cd Build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
sudo make install
cd ..
sudo apt-get install cython
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
Building and Installing with regard to python3
python3 setup.py build
sudo -H python3 setup.py install
I hope it can help you. Now just the dev version of theano is missing for me.

nginx install on linux

I downloaded nginx from it's site for linux(I use ubuntu 10.4).I extracted nginx-1.0.6.tar.gz and there was a configure file in that directory. So I entered "./configure" command in shell. It seemed to be configured right.After I entered "make" command ,It said this error:
make -f objs/Makefile
make[1]: Entering directory `/usr/local/nginx'
cd ./auto/lib/pcre/ \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared
/bin/sh: ./configure: not found
make[1]: *** [auto/lib/pcre//Makefile] Error 127
make[1]: Leaving directory `/usr/local/nginx'
make: *** [build] Error 2
what should I do now?
you have to install Dependencies .
generally these will be enough
libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
so you can first install them
sudo apt-get install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
and then compile .. also make sure you run the make command as root.
The ./configure program of nginx wants to find either the shared libs to build nginx dynamicaly linked or the sources of openssl prce and zlib respectivly.
The obove mentioned error occurs when you invoke ../nginx/configure with the wrong options.
--with-pcre=/path/to/lib # where libpcre.a resides
--with-openssl=/path/to/lib # where libssl.a resides
--with-zlib=/path/to/lib # where libz.a resides
is wrong especially when ld.so has no idea about these libs
If you build a statically linked version of nginx
try instead
--with-pcre=/path/to/src/of/pcre
--with-openssl=/path/to/src/of/openssl
--with-zlib=/path/to/src/of/zlib
e.g.
--with-pcre=../pcre-8.36 --with-openssl=../openssl-1.0.2 --with-zlib=../zlib-1.2.8
Download PCRE from source
Unzip it (do not install)
Copy this path to configure (from Downloads folder)
./configure --with-pcre=/home/USER/DOWNLOADS/pcre-8.37/
Enter your nginx install directory - I solved this error by editing objs/Makefile and removing -Wall and -Werror params so it looks like this (second line):
CC = gcc
CFLAGS = -pipe -O -W -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -g
Also, running your ./configure should initiate a long procedure of verifications to ensure
that your system contains all the necessary components. If the configuration fails for any reason, check
less objs/autoconf.err
for more details. Any errors at configuration are usually based on missing dependencies for your configuration.
You didn't configure it right. Use these commands (in the nginx directory):
./configure --with-pcre=./auto/lib/pcre/ --with-zlib=./auto/lib/zlib/
./configure
make
sudo make install
Look for Ubuntu installation at http://wiki.nginx.org/Install.
Look for ubuntu/ centos installation at https://nodevine.com/library/installing-multiple-virtual-hosts-on-nginx-on-ubuntu-12-04-and-cent-os-6
We can now add the repository to install the latest version of nginx:
sudo add-apt-repository ppa:nginx/stable
Note: If this command still does not work (normally on 12.10), run the following command:
sudo apt-get install software-properties-common
This will add the repository to Ubuntu and fetches the repository's key. This is to verify that the packages have not been interfered with since they have been built.
Step Three - Updating the Repositories
After adding a new repository, you will need to update the list:
sudo apt-get update
Install nginx
To install nginx or update the version you already have installed, run the following command:
sudo apt-get install nginx
Check That Nginx is Running
You can check to see that nginx is running by either going to your VPS' IP address/domain, or typing in:
service nginx status
This will tell you whether nginx is currently running.
with a vps debian wheezy
I have to install a lot of tools in order to install nginx 1.2.9 :
apt-get install libpcre3 libpcre3-dev
apt-get install --reinstall zlibc zlib1g zlib1g-dev
apt-get install make
apt-get install sudo

Resources