CentOS 7中手动编译Greenplum(2)

cd /home/gpdb_src ./configure --with-perl --with-Python --with-libxml --with-gssapi --prefix=/usr/local/gpdb make -j8 make -j8 install

注意:这里如果跳过了第七步,则configure时需要使用如下命令:

./configure --with-perl --with-python --with-libxml --with-gssapi --disable-orca --prefix=/usr/local/gpdb

configure有很多的组件可以加上,如果需要添加自定义可以使用./configure --help查看,加上自己需要的组件即可

通过以上步骤,就完成了编译。虽然本人已经力求写的详细,但是还是略过了一些自认为大家一看到就能知道原因,同时环境的差异也会导致一些本人没有遇到过的错误,所以有理由相信大家编译的时候还是会遇到一些问题,如果遇到了本文没有涉及到的错误可以告诉我,大家一起讨论。

三、错误处理

1)

安装必备工具或者升级pip时可能报类似如下错误:

Could not fetch URL https://pypi.python.org/simple/conan/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:765) - skipping

可以执行如下命令:

pip install --trusted-host pypi.python.org XXXX pip install --trusted-host pypi.python.org --upgrade pip

XXXX为你要安装的工具

2)

checking for xsltCleanupGlobals in -lxslt... no configure: error: library 'xslt' is required for XSLT support

执行如下命令:yum install libxslt libxslt-devel

3)

/bin/ld: libpq/SUBSYS.o: undefined reference to symbol 'gss_delete_sec_context@@gssapi_krb5_2_MIT' /bin/ld: note: 'gss_delete_sec_context@@gssapi_krb5_2_MIT' is defined in DSO /lib64/libgssapi_krb5.so.2 so try adding it to the linker command line /lib64/libgssapi_krb5.so.2: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[2]: *** [postgres] Error 1 make[2]: Leaving directory `/home/greenplum/src/backend' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/greenplum/src' make: *** [all] Error 2

类似这种错误基本都是安装步骤中第4步没有配置导致的

4)

checking for flags to link embedded Perl... Can't locate ExtUtils/Embed.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 .). BEGIN failed--compilation aborted. no configure: error: could not determine flags for linking embedded Perl. This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not installed.

yum install perl-ExtUtils-Embed -y

5)

checking for xmlSaveToBuffer in -lxml2... no configure: error: library 'xml2' (version >= 2.6.23) is required for XML support

yum install libxml2 libxml2-devel -y

6)

checking Checking ORCA version... configure: error: Your ORCA version is expected to be 2.51.XXX

这说明你装的orca的版本是不匹配的,需要安装匹配版本,那么如何在安装前知道需要什么版本,执行如下命令:

cd /home/gpdb_src/depends cat conanfile_orca.txt

这里在文件中可以看到如下记录:

[requires] orca/v2.51.0@gpdb/stable

到github上找到对应版本下载安装即可。

当需要更换版本时,需要清理掉之前已经安装的版本。默认情况下安装在/usr/local/目录下,根据安装的路径,执行如下命令删除已经安装的版本

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/11253543e2c5dc2d38eb7f8af665855c.html