centos7 pgrouting351

安装插件

yum -y install 'perl(version)' perl-Data-Dumper
[root@localhost build]# perl -v

This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 44 registered patches, see perl -V for more detail)

源码编译 

wget https://github.com/pgRouting/pgrouting/releases/download/v3.5.1/pgrouting-3.5.1.tar.gz
tar -zxvf pgrouting-3.5.1.tar.gz
cd pgrouting-3.5.1
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/pgrouting-3.5.1 \
-DBOOST_ROOT=/usr/local/boost172 \
-DPOSTGRESQL_PG_CONFIG=/usr/local/pg127/bin/pg_config
make && make install

验证 

CREATE EXTENSION postgis;
CREATE EXTENSION pgrouting
SELECT * FROM pgr_version();
--测试数据:https://docs.pgrouting.org/3.5/en/sampledata.html

Q&&A 

1.Can't locate version.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./scripts/build-extension-update-files.pl line 44.
BEGIN failed--compilation aborted at ./scripts/build-extension-update-files.pl line 44.

缺少perl version插件

安装即可

yum -y install 'perl(version)'

2.Can't locate Data/Dumper.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./scripts/build-extension-file.pl line 35 

缺少perl-Data-Dumper插件

yum install perl-Data-Dumper安装即可

你可能感兴趣的:(服务器,linux,运维)