Background Image

FORUM

조회 수 54 추천 수 0 댓글 4
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

* 질문 등록 시 다음의 내용을 꼭 기입하여 주세요.
OS
ubuntu18.04
CUBRID Ver.
cubrid 10.2
CUBRID TOOL Ver.
manager 10.1.0.0007 64bit
응용 환경(API)
python 3.6

* CUBRID 응용 오류, SQL 오류 또는 SQL 튜닝 관련된 문의는 반드시 다음의 내용을 추가해 주세요. 비밀글이나 비밀 댓글도 가능합니다.
* 저희가 상황을 이해하고, 재현이 가능해야 알 수 있는 문제들이 많습니다. 가능한 정보/정황들을 부탁합니다.
에러 내용 및 재현 방법 재현 가능한 Source와 SQL
관련 테이블(인덱스, 키정보 포함) 정보 CUBRID 홈 디렉토리 아래 log 디렉토리 압축


-------------- 아래에 질문 사항을 기입해 주세요. ------------------------------------------------------------------------
리눅스에서 다른 서버에 설치된 CUBRID와 연동하려고 cubrid-python 드라이버를 설치해서 연동을 했습니다.


pip install CUBRID-Python 또는 easy_install CUBRID-Python

으로 설치를 했었는데 계속 (-20002, 'ERROR: CCI, -20002, Invalid connection handle') 에러가 나타나 이것저것 확인해보니

pip나 easy_install로 설치하면 cubrid가 9.3.0.1버젼으로 설치가 되더군요.


제가 필요한 버젼은 10.2버젼이기 때문에 cubrid-python-10.2-latest.tar.gz 파일을 다운받아서 압축해제한 뒤 

python setup.py build 를 실행해 소스코드설치방법 대로 했지만 

아래와 같이 에러가 뜨면서 종료가 되는데
10.2 드라이버 설치하는 다른 방법 알 수 있을까요?

에러 전체----------------------------------------------------------------
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ranlib... (cached) ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking for bison... no
checking for byacc... no
checking for flex... no
checking for lex... no
checking for egrep... (cached) /bin/grep -E
checking for gawk... (cached) mawk
checking for diff... diff
checking for main in -lm... yes
checking for main in -ldl... yes
checking for main in -lpthread... yes
checking for main in -lcurses... no
checking for main in -lstdc++... yes
checking for ANSI C header files... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking whether stat file-mode macros are broken... no
checking whether time.h and sys/time.h may both be included... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for limits.h... (cached) yes
checking for limits.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking nl_types.h usability... yes
checking nl_types.h presence... yes
checking for nl_types.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking rpc/des_crypt.h usability... yes
checking rpc/des_crypt.h presence... yes
checking for rpc/des_crypt.h... yes
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking vsnprintf usability... no
checking vsnprintf presence... no
checking for vsnprintf... no
checking for off_t... yes
checking for size_t... yes
checking for pid_t... yes
checking size of char... 1
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of void *... 8
checking for long long... yes
checking for byte_t... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for intmax_t... yes
checking for intptr_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uintmax_t... yes
checking for uintptr_t... yes
checking for off64_t... no
checking whether struct tm is in sys/time.h or time.h... time.h
checking whether byte ordering is bigendian... no
checking for --hash-style=both linker support... yes
checking for vprintf... yes
checking for _doprnt... no
checking for getrlimit... yes
checking for sysconf... yes
checking for open_memstream... yes
checking for vasprintf... yes
checking for asprintf... yes
checking for strdup... yes
checking for strlcpy... no
checking for strlcat... no
checking for getopt... yes
checking for getopt_long... yes
checking for dirname... yes
checking for basename... yes
checking for ctime_r... yes
checking for localtime_r... yes
checking for drand48_r... yes
checking for glibc gethostbyname_r... yes
checking for Solaris/Irix gethostbyname_r... no
checking for struct hostent_data gethostbyname_r... no
checking whether gcc provides atomic builtins... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether build cci library only... yes
checking for java home... 
checking for bison... no
checking for libedit library... no
checking for lzo2 library... no
checking for libgcrypt library... no
checking for main in -lgcrypt... no
checking for libgpg-error library... no
checking for main in -lgpg-error... no
checking for aio library... no
checking for cubrid manager server... no
checking for expat library... no
checking for jansson library... no
checking whether to use CUBRID environment variable... yes
checking for bindir... ${exec_prefix}/bin
checking for libdir... ${exec_prefix}/lib
checking for localstatedir... ${prefix}/var
checking for confdir... $(prefix)/conf
checking for jspdir... $(prefix)/java
checking for jdbcdir... $(prefix)/jdbc
checking for demodir... $(prefix)/demo
checking for msgdir... $(prefix)/msg
checking for shlocdir... $(prefix)/locales
checking for compatdir... $(prefix)/compat
checking for logdir... $(prefix)/log
checking for tmpdir... $(prefix)/tmp
checking for tzlibdir... $(prefix)/timezones
configure: creating ./config.status
config.status: creating Makefile
config.status: creating external/Makefile
config.status: creating include/Makefile
config.status: creating cci/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
=== configuring in external/libregex38a (/root/Downloads/RB-10.2.0/cci-src/external/libregex38a)
configure: running /bin/bash ./configure.gnu --disable-option-checking '--prefix=/root/cubrid'  '--enable-64bit' --cache-file=/dev/null --srcdir=.
configured already. skip /root/Downloads/RB-10.2.0/cci-src/external/libregex38a
make  all-recursive
make[1]: Entering directory '/root/Downloads/RB-10.2.0/cci-src'
Making all in external
make[2]: Entering directory '/root/Downloads/RB-10.2.0/cci-src/external'
Making all in libregex38a
make[3]: Entering directory '/root/Downloads/RB-10.2.0/cci-src/external/libregex38a'
make  all-recursive
make[4]: Entering directory '/root/Downloads/RB-10.2.0/cci-src/external/libregex38a'
Making all in include
make[5]: Entering directory '/root/Downloads/RB-10.2.0/cci-src/external/libregex38a/include'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/root/Downloads/RB-10.2.0/cci-src/external/libregex38a/include'
make[5]: Entering directory '/root/Downloads/RB-10.2.0/cci-src/external/libregex38a'
make[5]: Leaving directory '/root/Downloads/RB-10.2.0/cci-src/external/libregex38a'
make[4]: Leaving directory '/root/Downloads/RB-10.2.0/cci-src/external/libregex38a'
make[3]: Leaving directory '/root/Downloads/RB-10.2.0/cci-src/external/libregex38a'
make[3]: Entering directory '/root/Downloads/RB-10.2.0/cci-src/external'
Skip install in libregex38a
make[3]: Leaving directory '/root/Downloads/RB-10.2.0/cci-src/external'
make[2]: Leaving directory '/root/Downloads/RB-10.2.0/cci-src/external'
Making all in cci
make[2]: Entering directory '/root/Downloads/RB-10.2.0/cci-src/cci'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include -I../src/api -I../src/base -I../src/broker -I../src/cci -I../src/compat    -I../external/include/libregex38a     -DGCC -DLINUX -D_GNU_SOURCE -DI386 -DX86 -DMAJOR_VERSION=10 -DMINOR_VERSION=1 -DPATCH_VERSION=0 -DRELEASE_STRING=10.1.0 -DMAJOR_RELEASE_STRING=10.1 -DBUILD_NUMBER=10.1.0.7663 -DBUILD_OS='linux_gnu'   -fPIC -Wall -W -Wwrite-strings -Wno-cast-qual -Wmissing-prototypes -Wredundant-decls -Wlong-long -Wextra -Wno-unused -ggdb -O2 -DNDEBUG -finline-functions -fno-omit-frame-pointer -MT libcascci_la-porting.lo -MD -MP -MF .deps/libcascci_la-porting.Tpo -c -o libcascci_la-porting.lo `test -f '../src/base/porting.c' || echo './'`../src/base/porting.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../src/api -I../src/base -I../src/broker -I../src/cci -I../src/compat -I../external/include/libregex38a -DGCC -DLINUX -D_GNU_SOURCE -DI386 -DX86 -DMAJOR_VERSION=10 -DMINOR_VERSION=1 -DPATCH_VERSION=0 -DRELEASE_STRING=10.1.0 -DMAJOR_RELEASE_STRING=10.1 -DBUILD_NUMBER=10.1.0.7663 -DBUILD_OS=linux_gnu -fPIC -Wall -W -Wwrite-strings -Wno-cast-qual -Wmissing-prototypes -Wredundant-decls -Wlong-long -Wextra -Wno-unused -ggdb -O2 -DNDEBUG -finline-functions -fno-omit-frame-pointer -MT libcascci_la-porting.lo -MD -MP -MF .deps/libcascci_la-porting.Tpo -c ../src/base/porting.c  -fPIC -DPIC -o .libs/libcascci_la-porting.o
In file included from ../include/system.h:81:0,
                 from ../config.h:318,
                 from ../src/base/porting.c:26:
../src/base/getopt.h:64:7: warning: redundant redeclaration of 'getopt' [-Wredundant-decls]
   int getopt (int, char *const *, const char *);
       ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/getopt_posix.h:27:0,
                 from /usr/include/unistd.h:872,
                 from ../include/system.h:64,
                 from ../config.h:318,
                 from ../src/base/porting.c:26:
/usr/include/x86_64-linux-gnu/bits/getopt_core.h:91:12: note: previous declaration of 'getopt' was here
 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
            ^~~~~~
In file included from ../include/system.h:81:0,
                 from ../config.h:318,
                 from ../src/base/porting.c:26:
../src/base/getopt.h:74:16: warning: redundant redeclaration of 'optarg' [-Wredundant-decls]
   extern char *optarg;
                ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/getopt_posix.h:27:0,
                 from /usr/include/unistd.h:872,
                 from ../include/system.h:64,
                 from ../config.h:318,
                 from ../src/base/porting.c:26:
/usr/include/x86_64-linux-gnu/bits/getopt_core.h:36:14: note: previous declaration of 'optarg' was here
 extern char *optarg;
              ^~~~~~
In file included from ../include/system.h:81:0,
                 from ../config.h:318,
                 from ../src/base/porting.c:26:
../src/base/getopt.h:75:14: warning: redundant redeclaration of 'opterr' [-Wredundant-decls]
   extern int opterr;
              ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/getopt_posix.h:27:0,
                 from /usr/include/unistd.h:872,
                 from ../include/system.h:64,
                 from ../config.h:318,
                 from ../src/base/porting.c:26:
/usr/include/x86_64-linux-gnu/bits/getopt_core.h:55:12: note: previous declaration of 'opterr' was here
 extern int opterr;
            ^~~~~~
In file included from ../include/system.h:81:0,
                 from ../config.h:318,
                 from ../src/base/porting.c:26:
../src/base/getopt.h:76:14: warning: redundant redeclaration of 'optind' [-Wredundant-decls]
   extern int optind;
              ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/getopt_posix.h:27:0,
                 from /usr/include/unistd.h:872,
                 from ../include/system.h:64,
                 from ../config.h:318,
                 from ../src/base/porting.c:26:
/usr/include/x86_64-linux-gnu/bits/getopt_core.h:50:12: note: previous declaration of 'optind' was here
 extern int optind;
            ^~~~~~
In file included from ../include/system.h:81:0,
                 from ../config.h:318,
                 from ../src/base/porting.c:26:
../src/base/getopt.h:77:14: warning: redundant redeclaration of 'optopt' [-Wredundant-decls]
   extern int optopt;
              ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/getopt_posix.h:27:0,
                 from /usr/include/unistd.h:872,
                 from ../include/system.h:64,
                 from ../config.h:318,
                 from ../src/base/porting.c:26:
/usr/include/x86_64-linux-gnu/bits/getopt_core.h:59:12: note: previous declaration of 'optopt' was here
 extern int optopt;
            ^~~~~~
../src/base/porting.c:48:10: fatal error: curses.h: No such file or directory
 #include <curses.h>
          ^~~~~~~~~~
compilation terminated.
Makefile:483: recipe for target 'libcascci_la-porting.lo' failed
make[2]: *** [libcascci_la-porting.lo] Error 1
make[2]: Leaving directory '/root/Downloads/RB-10.2.0/cci-src/cci'
Makefile:454: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/Downloads/RB-10.2.0/cci-src'
Makefile:343: recipe for target 'all' failed
make: *** [all] Error 2
script_dir: /root/Downloads/RB-10.2.0
CCI static lib not found. Exit.

  • ?
    kisoo 2020.05.13 11:22

    ncurses package가 없어서 오류가 발생한 것으로 보입니다.
    sudo yum install ncurses
    실행후 다시 build해 보시기 바랍니다. Linux version은 source 형태로만 제공되고 있습니다.

  • ?
    배수민 2020.05.13 14:14

    감사합니다. 해당 라이브러리를 설치하고 빌드하니 다른 파일하나가 없다는 에러로 바뀌길래 그 파일도 다시 찾아서 cci폴더로 복붙하고 재빌드하니 설치가 되네요.

    그런데 테스트용으로 코드를 실행하니 import에러가 뜨는데 이건 어떻게 해결해야 되는건가요?


    //실행 코드
    import CUBRIDdb
    conn = CUBRIDdb.connect('CUBRID:192.168.6.40:33000:test:::', 'dba', 'test1234')
    cur = conn.cursor()

    cur.execute("SELECT * FROM batch_log WHERE ROWNUM BETWEEN 1 AND 100;")
    rows = cur.fetchall()
    for r in rows:
    print(r)
    cur.close()
    conn.close()

    // 에러내용
    Traceback (most recent call last):
    File "/root/cubridTest/cubridTest.py", line 18, in <module>
    import CUBRIDdb
    File "/usr/local/lib/python3.6/dist-packages/CUBRIDdb/__init__.py", line 9, in <module>
    import _cubrid
    ImportError: /usr/local/lib/python3.6/dist-packages/_cubrid.cpython-36m-x86_64-linux-gnu.so: undefined symbol: map_get_otc_value

  • ?
    kisoo 2020.05.13 15:20
    map_get_otc_value () 함수는 CCI에 정의된 함수입니다. 아마도 빌드가 잘못된듯 한데요.
    어떤 파일이 없다고 오류가 나오는지요.
    그리고 현재 Linux 환경과 devtoolset (devtoolset-8, devtoolset-7)을 알려주시면 더 정확히 판단이 되겠습니다.
  • ?
    배수민 2020.05.13 15:41
    ../src/cci/cci_util.c:53:10: fatal error: libregex38a/regex38a.h: No such file or directory
    #include "libregex38a/regex38a.h"
    ^~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    Makefile:497: recipe for target 'libcascci_la-cci_util.lo' failed
    make[2]: *** [libcascci_la-cci_util.lo] Error 1
    make[2]: Leaving directory '/root/Downloads/RB-10.2.0/cci-src/cci'
    Makefile:454: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/root/Downloads/RB-10.2.0/cci-src'
    Makefile:343: recipe for target 'all' failed
    make: *** [all] Error 2
    script_dir: /root/Downloads/RB-10.2.0
    CCI static lib not found. Exit.

    위와 같은 에러가 나오길래 libregex38a 파일을 찾아서 넣고 build를 다시했더니 끝까지 종료가 되더라구요. 일단 cubrid드라이버를 언인스톨 시켰습니다.

    리눅스는 ubuntu 18.04버젼이며 gcc 버젼은 아래와 같습니다.
    root@2a58eb3aa31c:~/Downloads/RB-10.2.0# gcc --version
    gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

    root@2a58eb3aa31c:~/Downloads/RB-10.2.0# g++ --version
    g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 SQLGate for CUBRID 영구 무료 라이선스 제공 file admin 2020.04.09 121
3159 cubrid manager 데이터 가져오기 문의드립니다 ohgeumjin 2020.05.27 9
3158 테이블당 컬럼 수 조회하는 SQL문 ? 1 update ohgeumjin 2020.05.27 14
3157 cubrid.jdbc.driver.CUBRIDException: Semantic: Cannot coerce host var to type integer. 문의 드립니다 1 행복한이니 2020.05.26 16
3156 ADO.NET columninfos 반환값 관련 문의 Js 2020.05.26 16
3155 Cubrid exp/imp 기능이 있나요? 1 Philip Park 2020.05.25 20
3154 프로시저 질문드립니다. file hiy5978 2020.05.25 11
3153 cubrid manager 데이터 가져오기 응답없음 10 ohgeumjin 2020.05.25 75
3152 마이그레이션 툴 문의 2 희블리네 2020.05.20 38
3151 자바함수 사용시 데이터 누락 되는경우가 있는거같습니다 1 양석규 2020.05.19 30
3150 ADO.NET columninfos 반환값 관련 문의 2 file Js 2020.05.18 32
3149 큐브리드 시리얼 명칭 변경하는 곳은 어디에 있나요?ㅠㅠ 4 tpdms8 2020.05.18 47
3148 큐브리드에서 ddl 를 뽑아내고 싶습니다. 3 varsql 2020.05.18 35
3147 PHP DRIVER 컴파일 설치시 오류 1 나라디 2020.05.15 23
3146 쿼리 실행 에러 도움 요청 드립니다. 13 Mide 2020.05.15 98
3145 cubrid.jdbc.driver.CUBRIDException: Semantic: Cannot coerce host var to type datetime. 1 mimo 2020.05.13 24
» 리눅스에서 CUBRID-python설치시 문제 질문드려요 4 배수민 2020.05.12 54
3143 [cubrid 9.3] database에 설정된 timezone을 얻어오는법 질문입니다. 2 smoh 2020.05.11 23
3142 HA 구성시 master/slave 상태 확인 방법 1 nagh 2020.05.07 27
3141 8.4.4ver 큐브리드 JDBC Driver Connection 인터페이스 미구현 문제 4 bikehee 2020.05.07 28
3140 COUNT 함수 1 file 현수 2020.05.06 36
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 158 Next
/ 158

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2147 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales