MADlib is the most complete, efficient (faster functions) and reliable Mathematical library for PostgreSQL... At official download no clues about Debian or UBUNTU "plug-and-play installation".
Checking other fonts, the best (simplest) is an old 2013's instruction for apt-get it.
... Also some lost-script of 2014... A comment say "can download the .rpm
packages and to install in Ubuntu just convert the package to .deb
using Alien command it will work".
Question: secure and simplest way to install MADLib?
today (2017) at UBUNTU 16 LTS and PostgreSQL v9.6.
Note and secondary question: Debian stable and UBUNTU LTS together are the most popular Linux distributions for web-servers, so .deb
is the most important distribution form... Why does the MADlab maintainers refuse to see it? Why not welcome .deb
users?
There are some technical or license problems with apt
or converted .deb
?
I have two types of SQL servers, the v9.6 as stated, but the most important is with PostgreSQL v9.5.X (!sorry we are wayting to use v9.6 in all servers).
Situation at PostgreSQL 9.5.X in a UBUNTU 16 LTS (xenial)
psql --version
and into it, select version();
shows v9.5.6.
command pgxnclient install madlib
shows
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application. ERROR: command returned 1: ['/usr/bin/pg_config', '--libdir']
... pg_config is not a config file but a shell tool... So I installed it by sudo apt-get install libpq-dev
(ok!)
pgxnclient install madlib
shows INFO: best version: madlib 1.10.0 INFO: saving /tmp/tmpip4ngh/madlib-1.10.0.zip INFO: unpacking: /tmp/tmpip4ngh/madlib-1.10.0.zip INFO: running configure error: cmake 2.8 or higher must be present to configure and install MADlib /tmp/tmpip4ngh/madlib-1.10.0/configure: 13: exit: Illegal number: -1 ERROR: configure failed with return code 2
... but it is not a "CMake version error", is "no CMake" error, so used apt install cmake
!
but them a cmake problem,
pgxnclient install madlib INFO: best version: madlib 1.10.0 INFO: saving /tmp/tmpspQ3zf/madlib-1.10.0.zip INFO: unpacking: /tmp/tmpspQ3zf/madlib-1.10.0.zip INFO: running configure -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/g++ -- Check for working CXX compiler: /usr/bin/g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Could NOT find Boost -- No sufficiently recent version (>= 1.47) of Boost was found. Will download. -- Found PythonInterp: /usr/bin/python (found version "2.7.12") CMake Error at src/ports/postgres/cmake/FindPostgreSQL.cmake:161 (message): Found pg_config ("/usr/bin/pg_config"), but pg_config.h file not present in the server include dir (/usr/include/postgresql/9.5/server). Call Stack (most recent call first): src/ports/postgres/cmake/PostgreSQLUtils.cmake:66 (find_package) src/ports/postgres/CMakeLists.txt:360 (determine_target_versions)-- Configuring incomplete, errors occurred! See also "/tmp/tmpspQ3zf/madlib-1.10.0/build/CMakeFiles/CMakeOutput.log". INFO: building extension make -C build all make[1]: Entering directory '/tmp/tmpspQ3zf/madlib-1.10.0/build' make[1]: * No rule to make target 'all'. Stop. make[1]: Leaving directory '/tmp/tmpspQ3zf/madlib-1.10.0/build' Makefile:5: recipe for target 'all' failed make: * [all] Error 2 ERROR: command returned 2: make PG_CONFIG=/usr/bin/pg_config all
Madlib is a Postgres extension. Many people distribute their extensions via pgxn.org, which is like the CPAN or Rubygems of Postgres extensions. So the command to install it is this:
pgxnclient install madlib
After that, you can say CREATE EXTENSION madlib
in whatever database you like.
Note you may need to install some dependencies first, for example:
sudo apt-get install cmake postgresql-plpython-9.6 pgxnclient
This is what the link from 2013 is telling you, and it looks still correct to me. (Note I changed plpython from 9.1 to 9.6 though.) I tried installing madlib from pgxn myself on Postgres 9.5 + Ubuntu 14.04, and it worked.
As for why the madlib folks don't distribute a .deb
file: you could always ask them, but pgxn is the mainstream way to share Postgres extensions. It's just like having a package manager for your programming language.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With