[root@192 /]# yum install -y gd-devel
已加载插件:fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
- base: mirrors.huaweicloud.com
- extras: mirrors.aliyun.com
- updates: mirrors.tuna.tsinghua.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 gd-devel.x86_64.0.2.0.35-26.el7 将被 安装
--> 正在处理依赖关系 libpng-devel,它被软件包 gd-devel-2.0.35-26.el7.x86_64 需要
--> 正在处理依赖关系 libjpeg-devel,它被软件包 gd-devel-2.0.35-26.el7.x86_64 需要
--> 正在处理依赖关系 libXpm-devel,它被软件包 gd-devel-2.0.35-26.el7.x86_64 需要
--> 正在处理依赖关系 libX11-devel,它被软件包 gd-devel-2.0.35-26.el7.x86_64 需要
--> 正在处理依赖关系 freetype-devel,它被软件包 gd-devel-2.0.35-26.el7.x86_64 需要
--> 正在处理依赖关系 fontconfig-devel,它被软件包 gd-devel-2.0.35-26.el7.x86_64 需要
--> 正在检查事务
---> 软件包 fontconfig-devel.x86_64.0.2.10.95-11.el7 将被 安装
--> 正在处理依赖关系 pkgconfig(expat),它被软件包 fontconfig-devel-2.10.95-11.el7.x86_64 需要
---> 软件包 freetype-devel.x86_64.0.2.4.11-15.el7 将被 安装
---> 软件包 libX11-devel.x86_64.0.1.6.5-1.el7 将被 安装
--> 正在处理依赖关系 pkgconfig(xcb) >= 1.11.1,它被软件包 libX11-devel-1.6.5-1.el7.x86_64 需要
--> 正在处理依赖关系 pkgconfig(xproto),它被软件包 libX11-devel-1.6.5-1.el7.x86_64 需要
--> 正在处理依赖关系 pkgconfig(xcb),它被软件包 libX11-devel-1.6.5-1.el7.x86_64 需要
--> 正在处理依赖关系 pkgconfig(kbproto),它被软件包 libX11-devel-1.6.5-1.el7.x86_64 需要
---> 软件包 libXpm-devel.x86_64.0.3.5.12-1.el7 将被 安装
---> 软件包 libjpeg-turbo-devel.x86_64.0.1.2.90-5.el7 将被 安装
---> 软件包 libpng-devel.x86_64.2.1.5.13-7.el7_2 将被 安装
--> 正在检查事务
---> 软件包 expat-devel.x86_64.0.2.1.0-10.el7_3 将被 安装
---> 软件包 libxcb-devel.x86_64.0.1.12-1.el7 将被 安装
--> 正在处理依赖关系 pkgconfig(xau) >= 0.99.2,它被软件包 libxcb-devel-1.12-1.el7.x86_64 需要
---> 软件包 xorg-x11-proto-devel.noarch.0.7.7-20.el7 将被 安装
--> 正在检查事务
---> 软件包 libXau-devel.x86_64.0.1.0.8-2.1.el7 将被 安装
--> 解决依赖关系完成
依赖关系解决
=================================================================================================================================================================================================================
Package 架构 版本 源 大小
正在安装:
gd-devel x86_64 2.0.35-26.el7 base 79 k
为依赖而安装:
expat-devel x86_64 2.1.0-10.el7_3 base 57 k
fontconfig-devel x86_64 2.10.95-11.el7 base 128 k
freetype-devel x86_64 2.4.11-15.el7 base 356 k
libX11-devel x86_64 1.6.5-1.el7 base 980 k
libXau-devel x86_64 1.0.8-2.1.el7 base 14 k
libXpm-devel x86_64 3.5.12-1.el7 base 36 k
libjpeg-turbo-devel x86_64 1.2.90-5.el7 base 98 k
libpng-devel x86_64 2:1.5.13-7.el7_2 base 122 k
libxcb-devel x86_64 1.12-1.el7 base 1.0 M
xorg-x11-proto-devel noarch 7.7-20.el7 base 284 k
事务概要
安装 1 软件包 (+10 依赖软件包)
总下载量:3.1 M
安装大小:8.6 M
Downloading packages:
(1/11): expat-devel-2.1.0-10.el7_3.x86_64.rpm | 57 kB 00:00:00
(2/11): libXau-devel-1.0.8-2.1.el7.x86_64.rpm | 14 kB 00:00:00
(3/11): gd-devel-2.0.35-26.el7.x86_64.rpm | 79 kB 00:00:00
(4/11): libXpm-devel-3.5.12-1.el7.x86_64.rpm | 36 kB 00:00:00
(5/11): libjpeg-turbo-devel-1.2.90-5.el7.x86_64.rpm | 98 kB 00:00:00
(6/11): libxcb-devel-1.12-1.el7.x86_64.rpm | 1.0 MB 00:00:00
(7/11): xorg-x11-proto-devel-7.7-20.el7.noarch.rpm | 284 kB 00:00:00
(8/11): libpng-devel-1.5.13-7.el7_2.x86_64.rpm | 122 kB 00:00:01
(9/11): fontconfig-devel-2.10.95-11.el7.x86_64.rpm | 128 kB 00:00:05
(10/11): libX11-devel-1.6.5-1.el7.x86_64.rpm | 980 kB 00:00:06
(11/11): freetype-devel-2.4.11-15.el7.x86_64.rpm | 356 kB 00:00:06
总计 514 kB/s | 3.1 MB 00:00:06
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : xorg-x11-proto-devel-7.7-20.el7.noarch 1/11
正在安装 : freetype-devel-2.4.11-15.el7.x86_64 2/11
正在安装 : libXau-devel-1.0.8-2.1.el7.x86_64 3/11
正在安装 : libxcb-devel-1.12-1.el7.x86_64 4/11
正在安装 : libX11-devel-1.6.5-1.el7.x86_64 5/11
正在安装 : libXpm-devel-3.5.12-1.el7.x86_64 6/11
正在安装 : expat-devel-2.1.0-10.el7_3.x86_64 7/11
正在安装 : fontconfig-devel-2.10.95-11.el7.x86_64 8/11
正在安装 : libjpeg-turbo-devel-1.2.90-5.el7.x86_64 9/11
正在安装 : 2:libpng-devel-1.5.13-7.el7_2.x86_64 10/11
正在安装 : gd-devel-2.0.35-26.el7.x86_64 11/11
验证中 : 2:libpng-devel-1.5.13-7.el7_2.x86_64 1/11
验证中 : freetype-devel-2.4.11-15.el7.x86_64 2/11
验证中 : gd-devel-2.0.35-26.el7.x86_64 3/11
验证中 : libjpeg-turbo-devel-1.2.90-5.el7.x86_64 4/11
验证中 : xorg-x11-proto-devel-7.7-20.el7.noarch 5/11
验证中 : libXpm-devel-3.5.12-1.el7.x86_64 6/11
验证中 : expat-devel-2.1.0-10.el7_3.x86_64 7/11
验证中 : libxcb-devel-1.12-1.el7.x86_64 8/11
验证中 : fontconfig-devel-2.10.95-11.el7.x86_64 9/11
验证中 : libX11-devel-1.6.5-1.el7.x86_64 10/11
验证中 : libXau-devel-1.0.8-2.1.el7.x86_64 11/11
已安装:
gd-devel.x86_64 0:2.0.35-26.el7
作为依赖被安装:
expat-devel.x86_64 0:2.1.0-10.el7_3 fontconfig-devel.x86_64 0:2.10.95-11.el7 freetype-devel.x86_64 0:2.4.11-15.el7 libX11-devel.x86_64 0:1.6.5-1.el7 libXau-devel.x86_64 0:1.0.8-2.1.el7
libXpm-devel.x86_64 0:3.5.12-1.el7 libjpeg-turbo-devel.x86_64 0:1.2.90-5.el7 libpng-devel.x86_64 2:1.5.13-7.el7_2 libxcb-devel.x86_64 0:1.12-1.el7 xorg-x11-proto-devel.noarch 0:7.7-20.el7
完毕!
[postgres@192 /]$ cd mycwj/
[postgres@192 mycwj]$ git clone https://github.com/postgrespro/imgsmlr
Cloning into 'imgsmlr'...
remote: Counting objects: 146, done.
remote: Total 146 (delta 0), reused 0 (delta 0), pack-reused 146
Receiving objects: 100% (146/146), 241.11 KiB | 155.00 KiB/s, done.
Resolving deltas: 100% (69/69), done.
[postgres@192 mycwj]$ ll
total 4.0K
drwxrwxr-x 7 postgres postgres 4.0K Jun 23 23:47 imgsmlr
drwxrwxr-x. 2 postgres postgres 6 Jun 3 06:28 t
[postgres@192 mycwj]$ cd imgsmlr/
[postgres@192 imgsmlr]$ ll
total 60K
drwxrwxr-x 2 postgres postgres 153 Jun 23 23:47 data
drwxrwxr-x 2 postgres postgres 44 Jun 23 23:47 expected
-rwxrwxr-x 1 postgres postgres 3.4K Jun 23 23:47 imgsmlr--1.0.sql
-rwxrwxr-x 1 postgres postgres 16K Jun 23 23:47 imgsmlr.c
-rwxrwxr-x 1 postgres postgres 135 Jun 23 23:47 imgsmlr.control
-rwxrwxr-x 1 postgres postgres 920 Jun 23 23:47 imgsmlr.h
-rwxrwxr-x 1 postgres postgres 13K Jun 23 23:47 imgsmlr_idx.c
-rw-rw-r-- 1 postgres postgres 1.3K Jun 23 23:47 LICENSE
-rwxrwxr-x 1 postgres postgres 762 Jun 23 23:47 Makefile
-rw-rw-r-- 1 postgres postgres 5.4K Jun 23 23:47 README.md
drwxrwxr-x 2 postgres postgres 24 Jun 23 23:47 sql
drwxrwxr-x 2 postgres postgres 137 Jun 23 23:47 travis
[postgres@192 imgsmlr]$ make USE_PGXS=1
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -
I./ -I/usr/local/postgresql/include/server -I/usr/local/postgresql/include/internal -D_GNU_SOURCE -c -o imgsmlr.o imgsmlr.cgcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -
I./ -I/usr/local/postgresql/include/server -I/usr/local/postgresql/include/internal -D_GNU_SOURCE -c -o imgsmlr_idx.o imgsmlr_idx.cgcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -shar
ed -o imgsmlr.so imgsmlr.o imgsmlr_idx.o -L/usr/local/postgresql/lib -Wl,--as-needed -Wl,-rpath,'/usr/local/postgresql/lib',--enable-new-dtags -lgd [postgres@192 imgsmlr]$ make USE_PGXS=1 install
/usr/bin/mkdir -p '/usr/local/postgresql/lib'
/usr/bin/mkdir -p '/usr/local/postgresql/share/extension'
/usr/bin/mkdir -p '/usr/local/postgresql/share/extension'
/usr/bin/install -c -m 755 imgsmlr.so '/usr/local/postgresql/lib/imgsmlr.so'
/usr/bin/install -c -m 644 .//imgsmlr.control '/usr/local/postgresql/share/extension/'
/usr/bin/install -c -m 644 .//imgsmlr--1.0.sql '/usr/local/postgresql/share/extension/'
[postgres@192 imgsmlr]$
postgres=# create extension imgsmlr;
CREATE EXTENSION
postgres=# create table image (id serial, data bytea);
CREATE TABLE
postgres=#