Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- Database 생성 삭제 조회 변경
- 아카이브로그 삭제
- psql 복구
- PostgreSQL Admin
- PostgreSQL 테이블스페이스 생성 삭제
- sql문 짤릴 때
- dblink 삭제
- 다른계정에서 dblink 삭제방법
- ogg 설치 방법
- oracle error
- PostgreSQL Backup and Recovery
- sql문 전체 출력 방법
- PostgreSQL 스키마 관리
- pgcrypto
- ogg 구성
- 19c tde
- table lock 조치 방법
- OGG
- db upgrade
- PostgreSQL 아키텍처
- PostgreSQL Parameter 설정 방법
- PostgreSQL Parameter
- PostgreSQL 테이블스페이스 관리
- PostgreSQL Install
- pg_basebackup
- Linux
- Goldengate
- oracle
- pg_dumpall
- multitenant
Archives
- Today
- Total
인성장
[PostgreSQL] Could not load library ... /pgcrypto.so: undefined symbol: EVP_cast 본문
PostgreSQL/Error
[PostgreSQL] Could not load library ... /pgcrypto.so: undefined symbol: EVP_cast
인성장 2024. 11. 19. 17:10Error Message
ERROR: could not load library "/postgres/app/postgres/pgsql15/lib/pgcrypto.so": /postgres/app/postgres/pgsql15/lib/pgcrypto.so: undefined symbol: EVP_cast5_cbc
Linux 8.x에 PostgreSQL 15를 Source File Compile 형식으로 설치하고 확장 기능인 pgcrypto를 생성하려 할때 위와 같은 에러가 발생했습니다.
실제로 pgcrypto 디렉토리 내에서 make check 시에도 아래와 같이 Error가 발생하는 것을 확인할 수 있습니다.
$ cd /home/postgres/postgresql-15.3/contrib/pgcrypto
$ make check
...(생략)...
============== running regression test queries ==============
test init ... FAILED 56 ms
test md5 ... FAILED 49 ms
test sha1 ... FAILED 42 ms
test hmac-md5 ... FAILED 33 ms
test hmac-sha1 ... FAILED 33 ms
test blowfish ... FAILED 48 ms
test rijndael ... FAILED 35 ms
test sha2 ... FAILED 52 ms
test des ... FAILED 30 ms
test 3des ... FAILED 36 ms
test cast5 ... FAILED 34 ms
test crypt-des ... FAILED 41 ms
test crypt-md5 ... FAILED 42 ms
test crypt-blowfish ... FAILED 56 ms
test crypt-xdes ... FAILED 40 ms
test pgp-armor ... FAILED 39 ms
test pgp-decrypt ... FAILED 60 ms
test pgp-encrypt ... FAILED 32 ms
test pgp-compression ... FAILED 34 ms
test pgp-pubkey-decrypt ... FAILED 47 ms
test pgp-pubkey-encrypt ... FAILED 32 ms
test pgp-info ... FAILED 31 ms
============== shutting down postmaster ==============
========================
22 of 22 tests failed.
========================
...(생략)...
정확한 이유는 모르나, OPENSSL과 관련된 문제인것으로 예상됩니다. 이 문제는 15 이후 버전의 pgcrypto 기능을 설치하여 사용하려 할때 문제가 발생되는 것을 확인했습니다.
해결방법
PostgreSQL 14 버전 Source File 안에 있는 pgcrypto 디렉토리를 가져와서 컴파일 해주면 됩니다.
-- 14 version source file : 압축 해제
$ tar -zxvf postgresql-14.11.tar.gz
-- 15 version source file : pgcrypto 디렉토리 백업
$ mv postgresql-15.3/contrib/pgcrypto postgresql-15.3/contrib/pgcrypto_old
-- 14 version pgcrypto 디렉토리 압축
$ cd postgresql-14.11/contrib/
$ tar -zcvf pgcrypto14.tar.gz pgcrypto/
-- 압축파일 15 version 설치파일 contrib 디렉토리로 이동
$ mv pgcrypto14.tar.gz /home/postgres/postgresql-15.3/contrib/
$ cd /home/postgres/postgresql-15.3/contrib
-- 14 version pgcrypto 압축 해제 및 컴파일
$ tar -zxvf pgcrypto14.tar.gz
$ cd pgcrypto
$ make && make install
위 작업을 마치면, psql 내부에서 pgcrypto 확장기능 1.3 버전으로 정상적으로 extension이 생성되는것을 보실 수 있습니다.
$ psql
Timing is on.
psql (15.3)
Type "help" for help.
postgres=# create extension pgcrypto;
CREATE EXTENSION
Time: 60.262 ms
postgres=# \dx
List of installed extensions
Name | Version | Schema | Description
--------------------+---------+------------+------------------------------------------------------------------------
bloom | 1.0 | public | bloom access method - signature file based index
dblink | 1.2 | public | connect to other PostgreSQL databases from within a database
pg_stat_statements | 1.10 | public | track planning and execution statistics of all SQL statements executed
pgcrypto | 1.3 | public | cryptographic functions
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
postgis | 3.4.2 | public | PostGIS geometry and geography spatial types and functions
(6 rows)