MADlib apt install, how?

MADlib is the most comprehensive, efficient (faster function) and reliable math library for PostgreSQL ... There are no tips on installing the plug-and-play Debian or UBUNTU in the official download .

When checking other fonts, the best (easiest) is the old instruction for apt-get it .

... Also some lost-script of 2014 ... The comment says: "You can download the .rpm and install packages in Ubuntu, just convert the package to .deb using the Alien command, it will work."


Question: a safe and easy way to install MADLib?
today (2017) in UBUNTU 16 LTS and PostgreSQL v9.6.


Note and secondary question: stable Debian and UBUNTU LTS together are the most popular Linux distributions for web servers, so .deb is the most important form of distribution ... Why do MADlab developers refuse to see it? Why not welcome .deb users?
Have some technical or licensing problems with apt or converted .deb ?


EDIT

I have two types of SQL servers: v9.6, as indicated, but the most important thing is PostgreSQL v9.5.X (sorry that we use v9.6 on all servers).

PostgreSQL 9.5.X situation in UBUNTU 16 LTS (xenial)

  • psql --version and select version(); into it select version(); shown v9.5.6.

  • pgxnclient install madlib shows

      You need to install postgresql-server-dev-XY 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 configuration file, but a shell tool ... So I installed it on 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 this is not a "CMake version error", this is a "no CMake" error, so apt install cmake !

but the 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 sufficient 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 have occurred! See also "/tmp/tmpspQ3zf/madlib-1.10.0/build/CMakeFiles/CMakeOutput.log". INFO: building extension make -C build all make [1]: Entering the directory '/tmp/tmpspQ3zf/madlib-1.10.0/build' make [1]: * There is no rule to make the goal all. Stop. make [1]: leave the folder '/tmp/tmpspQ3zf/madlib-1.10.0/build' Makefile: 5: the recipe for the goal "all" did not complete make: * [all] Error 2 ERROR: the command returns 2: make PG_CONFIG = / usr / bin / pg_config all

+5
source share
1 answer

Madlib - Postgres extension . Many people distribute their extensions through pgxn.org , which is similar to the CPAN or Rubygems of Postgres extensions. So, the command to install it:

 pgxnclient install madlib 

After that, you can say CREATE EXTENSION madlib in any database that you like.

Note. You may need to install some dependencies first, for example:

 sudo apt-get install cmake postgresql-plpython-9.6 pgxnclient 

Here's what the link has been telling you since 2013, and it still looks right for 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 madlib people don't distribute the .deb file: you can always ask them, but pgxn is the main way to share Postgres extensions. This is similar to having a package manager for your programming language.

+1
source

Source: https://habr.com/ru/post/1266737/


All Articles