cd /rootvi .base_profileexport ORACLE_HOME=/usr/lib/oracle/19.10/client64export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATHexport PATH=$ORACLE_HOME/bin:$PATH
复制代码
使变量生效
source .base_profile
复制代码
获取安装包、然后举行编译安装
[root@master01 DBD-Oracle-1.80]# perl Makefile.PLMultiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/vendor_perl/auto/DBI/ at Makefile.PL line 36.Using DBI 1.643 (for perl 5.016003 on x86_64-linux-thread-multi) installed in /usr/local/lib64/perl5/auto/DBI/Configuring DBD::Oracle for perl 5.016003 on linux (x86_64-linux-thread-multi)If you encounter any problem, a collection of troubleshootingguides are available under lib/DBD/Oracle/Troubleshooting.'DBD::Oracle::Troubleshooting' is the general troubleshootingguide, while platform-specific troubleshooting hintslive in their labelled sub-document (e.g., Win32hints are gathered in 'lib/DBD/Oracle/Troubleshooting/Win32.pod').Trying to find an ORACLE_HOMEYour LD_LIBRARY_PATH env var is set to '/opt/huawei/install/om/lib:/opt/huawei/install/om/script/gspylib/clib:'Found /usr/lib/oracle/19.10/client64WARNING: Setting ORACLE_HOME env var to /usr/lib/oracle/19.10/client64 for you.WARNING: If these tests fail you may have to set ORACLE_HOME yourself!Installing on a linux, Ver#3.10Using Oracle in /usr/lib/oracle/19.10/client64DEFINE _SQLPLUS_RELEASE = "1910000000" (CHAR)Oracle Version 19.10.0.0 (19.10)Found direct-link candidates: libclntsh.soOracle sysliblist:Found header files in /usr/include/oracle/19.10/client64.Your LD_LIBRARY_PATH env var is set to '/opt/huawei/install/om/lib:/opt/huawei/install/om/script/gspylib/clib:'WARNING: Your LD_LIBRARY_PATH env var doesn't include '/usr/lib/oracle/19.10/client64/lib' but probably needs to.client_version=19.10DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"19.10.0.0\" -DORA_OCI_102 -DORA_OCI_112Checking for functioning wait.phSystem: perl5.016003 linux x86-02.bsys.centos.org 3.10.0-957.1.3.el7.x86_64 #1 smp thu nov 29 14:49:43 utc 2018 x86_64 x86_64 x86_64 gnulinuxCompiler: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64Linker: /usr/bin/ldSysliblist:Linking with -lclntsh.Checking if your kit is complete...Looks goodLD_RUN_PATH=/usr/lib/oracle/19.10/client64/libUsing DBD::Oracle 1.80.Using DBD::Oracle 1.80.Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/vendor_perl/auto/DBI/ at Makefile.PL line 1807.Using DBI 1.643 (for perl 5.016003 on x86_64-linux-thread-multi) installed in /usr/local/lib64/perl5/auto/DBI/Generating a Unix-style MakefileWriting Makefile for DBD::OracleWriting MYMETA.yml and MYMETA.json
[root@master01 openGauss-tools-ora2og-master]# perl Makefile.PLChecking if your kit is complete...Looks goodInvalid LICENSE value 'GPLv3' ignoredGenerating a Unix-style MakefileWriting Makefile for Ora2PgInvalid LICENSE value 'GPLv3' ignoredWriting MYMETA.yml and MYMETA.jsonDone...------------------------------------------------------------------------------Please read documentation at http://ora2pg.darold.net/ before asking for help------------------------------------------------------------------------------Now type: make && make install
复制代码
编译并安装
[root@master01 openGauss-tools-ora2og-master]# make && make installcp lib/Ora2Pg/GEOM.pm blib/lib/Ora2Pg/GEOM.pmcp lib/Ora2Pg.pm blib/lib/Ora2Pg.pmcp lib/Ora2Pg/PLSQL.pm blib/lib/Ora2Pg/PLSQL.pmcp lib/Ora2Pg/MySQL.pm blib/lib/Ora2Pg/MySQL.pmcp scripts/ora2pg blib/script/ora2pg"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/ora2pgcp scripts/ora2pg_scanner blib/script/ora2pg_scanner"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/ora2pg_scannerManifying 1 pod documentManifying 1 pod documentInstalling /root/perl5/lib/perl5/Ora2Pg.pmInstalling /root/perl5/lib/perl5/Ora2Pg/GEOM.pmInstalling /root/perl5/lib/perl5/Ora2Pg/PLSQL.pmInstalling /root/perl5/lib/perl5/Ora2Pg/MySQL.pmInstalling /root/perl5/man/man3/ora2pg.3Installing /root/perl5/bin/ora2pgInstalling /root/perl5/bin/ora2pg_scannerInstalling default configuration file (ora2pg.conf.dist) to /etc/ora2pgAppending installation info to /root/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod[root@master01 openGauss-tools-ora2og-master]#
[root@master01 DBD-Pg-3.14.2]# perl Makefile.PLConfiguring DBD::Pg 3.14.2PostgreSQL version: 90204 (default port: 5432)POSTGRES_HOME: (not set)POSTGRES_INCLUDE: /opt/huawei/install/app/includePOSTGRES_LIB: /opt/huawei/install/app/libOS: linuxMultiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/li b64/perl5/vendor_perl/auto/DBI/ at Makefile.PL line 182.Checking if your kit is complete...Looks goodMultiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/li b64/perl5/vendor_perl/auto/DBI/ at Makefile.PL line 284.Using DBI 1.643 (for perl 5.016003 on x86_64-linux-thread-multi) installed in /u sr/local/lib64/perl5/auto/DBI/Generating a Unix-style MakefileWriting Makefile for DBD::PgWriting MYMETA.yml and MYMETA.json
复制代码
[root@master01 DBD-Pg-3.14.2]# makeSkip blib/lib/Bundle/DBD/Pg.pm (unchanged)Skip blib/lib/DBD/Pg.pm (unchanged)Running Mkbootstrap for Pg ()chmod 644 "Pg.bs""/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pg.bs blib/arch/auto/DBD/Pg/Pg.bs 644gcc -c -I/opt/huawei/install/app/include -I/usr/local/lib64/perl5/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPGLIBVERSION=90204 -DPGDEFPORT=5432 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.14.2\" -DXS_VERSION=\"3.14.2\" -fPIC "-I/usr/lib64/perl5/CORE" Pg.cgcc -c -I/opt/huawei/install/app/include -I/usr/local/lib64/perl5/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPGLIBVERSION=90204 -DPGDEFPORT=5432 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.14.2\" -DXS_VERSION=\"3.14.2\" -fPIC "-I/usr/lib64/perl5/CORE" dbdimp.cgcc -c -I/opt/huawei/install/app/include -I/usr/local/lib64/perl5/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPGLIBVERSION=90204 -DPGDEFPORT=5432 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.14.2\" -DXS_VERSION=\"3.14.2\" -fPIC "-I/usr/lib64/perl5/CORE" quote.cIn file included from Pg.h:58:0, from quote.c:10:/usr/local/lib64/perl5/auto/DBI/DBIXS.h:493:25: warning: ‘dbi_get_state’ defined but not used [-Wunused-function] static dbistate_t** dbi_get_state(pTHX) { \ ^/usr/local/lib64/perl5/auto/DBI/DBIXS.h:506:27: note: in expansion of macro ‘_DBISTATE_DECLARE_COMMON’ # define DBISTATE_DECLARE _DBISTATE_DECLARE_COMMON ^Pg.h:64:1: note: in expansion of macro ‘DBISTATE_DECLARE’ DBISTATE_DECLARE; ^gcc -c -I/opt/huawei/install/app/include -I/usr/local/lib64/perl5/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPGLIBVERSION=90204 -DPGDEFPORT=5432 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.14.2\" -DXS_VERSION=\"3.14.2\" -fPIC "-I/usr/lib64/perl5/CORE" types.cIn file included from Pg.h:58:0, from types.c:15:/usr/local/lib64/perl5/auto/DBI/DBIXS.h:493:25: warning: ‘dbi_get_state’ defined but not used [-Wunused-function] static dbistate_t** dbi_get_state(pTHX) { \ ^/usr/local/lib64/perl5/auto/DBI/DBIXS.h:506:27: note: in expansion of macro ‘_DBISTATE_DECLARE_COMMON’ # define DBISTATE_DECLARE _DBISTATE_DECLARE_COMMON ^Pg.h:64:1: note: in expansion of macro ‘DBISTATE_DECLARE’ DBISTATE_DECLARE; ^rm -f blib/arch/auto/DBD/Pg/Pg.soLD_RUN_PATH="/opt/huawei/install/app/lib" gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro Pg.o dbdimp.o quote.o types.o -o blib/arch/auto/DBD/Pg/Pg.so \ -L/opt/huawei/install/app/lib -lpq -lm \chmod 755 blib/arch/auto/DBD/Pg/Pg.soManifying 2 pod documents[root@master01 DBD-Pg-3.14.2]# make install"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pg.bs blib/arch/auto/DBD/Pg/Pg.bs 644Manifying 2 pod documentsFiles found in blib/arch: installing files in blib/lib into architecture dependent library treeInstalling /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/DBD/Pg/Pg.soInstalling /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Pg.pmInstalling /root/perl5/lib/perl5/x86_64-linux-thread-multi/Bundle/DBD/Pg.pmInstalling /root/perl5/man/man3/DBD::Pg.3pmInstalling /root/perl5/man/man3/Bundle::DBD::Pg.3pmAppending installation info to /root/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod[root@master01 DBD-Pg-3.14.2]#