加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgresql – MADlib apt安装,怎么样?

发布时间:2020-12-13 16:08:22 所属栏目:百科 来源:网络整理
导读:MADlib是PostgreSQL中最完整,最有效(更快的函数)和可靠的数学库…在 official download 没有关于Debian或UBUNTU“即插即用安装”的线索. 检查其他字体,最好(最简单)是旧的2013年apt-get it指令. …也是2014年的一些lost-script …评论说“可以下载.rpm软件包
MADlib是PostgreSQL中最完整,最有效(更快的函数)和可靠的数学库…在 official download
没有关于Debian或UBUNTU“即插即用安装”的线索.

检查其他字体,最好(最简单)是旧的2013年apt-get it指令.

…也是2014年的一些lost-script …评论说“可以下载.rpm软件包并安装在Ubuntu中,只需使用Alien命令将软件包转换为.deb即可”.

问题:安装MADLib的安全且最简单的方法是什么?今天(2017年)在UBUNTU 16 LTS和PostgreSQL v9.6.

注意和次要问题:Debian stable和UBUNTU LTS一起是Web服务器最流行的Linux发行版,因此.deb是最重要的发布形式……为什么MADlab维护者拒绝看到它?为什么不欢迎.deb用户?apt或convert .deb存在一些技术或许可问题?

编辑

我有两种类型的SQL服务器,如上所述的v9.6,但最重要的是PostgreSQL v9.5.X(对不起,我们想在所有服务器中使用v9.6).

PostgreSQL 9.5.X在UBUNTU 16 LTS(xenial)中的情况

> psql –version并进入它,选择version();显示v9.5.6.
>命令pgxnclient install madlib显示

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不是配置文件而是shell工具……所以我通过sudo apt-get install libpq-dev安装它(ok!)

>命令pgxnclient install madlib显示

  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

…但它不是“CMake版本错误”,是“没有CMake”错误,所以使用apt install cmake!

但他们是一个cmake问题,

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是Postgres extension.许多人通过 pgxn.org分发他们的扩展,这类似于Postgres扩展的 CPAN或 Rubygems.所以安装它的命令是这样的:

pgxnclient install madlib

之后,你可以在任何你喜欢的数据库中说CREATE EXTENSION madlib.

请注意,您可能需要先安装一些依赖项,例如:

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

这是2013年的链接告诉你的,它看起来仍然正确. (注意我将plpython从9.1更改为9.6.)我尝试在Postgres 9.5 Ubuntu 14.04上自己从pgxn安装madlib,并且它有效.

至于为什么madlib人不分发.deb文件:你总是可以问他们,但pgxn是分享Postgres扩展的主流方式.这就像拥有编程语言的包管理器一样.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读