프린트 하기

내맘대로긍정이 알려주는

Oracle 23ai 신기능
무료 세미나 발표자료

다운로드 trending_flat

OS환경 : Redhat Linux 7.6 (64bit)


DB 환경 : Oracle Database 19.3.0.0


에러 : Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

오라클 설치를 위해 yum으로 preinstall 을 설치할 때 발생한 오류(49번 째 줄)

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# yum install -y oracle-database-preinstall-19c
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
ol7_UEKR5                                                                                                                             | 2.5 kB  00:00:00     
ol7_latest                                                                                                                            | 2.7 kB  00:00:00     
(1/5): ol7_UEKR5/x86_64/updateinfo                                                                                                    |  72 kB  00:00:00     
(2/5): ol7_latest/x86_64/updateinfo                                                                                                   | 2.9 MB  00:00:01     
(3/5): ol7_latest/x86_64/group                                                                                                        | 660 kB  00:00:01     
(4/5): ol7_UEKR5/x86_64/primary_db                                                                                                    |  12 MB  00:00:01     
(5/5): ol7_latest/x86_64/primary_db                                                                                                   |  36 MB  00:00:04     
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-preinstall-19c.x86_64 0:1.0-2.el7 will be installed
--> Processing Dependency: ksh for package: oracle-database-preinstall-19c-1.0-2.el7.x86_64
--> Processing Dependency: libaio-devel for package: oracle-database-preinstall-19c-1.0-2.el7.x86_64
--> Running transaction check
---> Package ksh.x86_64 0:20120801-142.0.1.el7 will be installed
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=============================================================================================================================================================
 Package                                            Arch                       Version                                  Repository                      Size
=============================================================================================================================================================
Installing:
 oracle-database-preinstall-19c                     x86_64                     1.0-2.el7                                ol7_latest                      19 k
Installing for dependencies:
 ksh                                                x86_64                     20120801-142.0.1.el7                     ol7_latest                     882 k
 libaio-devel                                       x86_64                     0.3.109-13.el7                           ol7_latest                      12 k
 
Transaction Summary
=============================================================================================================================================================
Install  1 Package (+2 Dependent packages)
 
Total download size: 914 k
Installed size: 3.2 M
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/ol7_latest/packages/libaio-devel-0.3.109-13.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEYETA 
Public key for libaio-devel-0.3.109-13.el7.x86_64.rpm is not installed
(1/3): libaio-devel-0.3.109-13.el7.x86_64.rpm                                                                                         |  12 kB  00:00:00     
(2/3): oracle-database-preinstall-19c-1.0-2.el7.x86_64.rpm                                                                            |  19 kB  00:00:00     
(3/3): ksh-20120801-142.0.1.el7.x86_64.rpm                                                                                            | 882 kB  00:00:00     
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                        1.2 MB/| 914 kB  00:00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
 
 
GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle"



해결 방법 : gpgcheck 값을 1에서 0으로 변경

/etc/yum.repos.d/public-yum-ol7.repo 파일 vi 로 실행
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# vi /etc/yum.repos.d/public-yum-ol7.repo
[ol7_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
 
[ol7_u0_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/0/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
.
.
.

gpgcheck 의 값이 1로 되어있음

1이 GPG key를 검사한다는 의미

0이 GPG key를 검사하지 않는다는 의미



gpgcheck 의 값을 0으로 변경

vi 명령어 : 입력 후 %s/gpgcheck=1/gpgcheck=0/g 를 입력하여 

모든 gpgcheck=1을 gpgcheck=0으로 변경

1
2
# vi /etc/yum.repos.d/public-yum-ol7.repo
:%s/gpgcheck=1/gpgcheck=0/g



설정 후 preinstall 재실행

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# yum install -y oracle-database-preinstall-19c
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
ol7_UEKR5                                                                                                                             | 2.5 kB  00:00:00     
ol7_latest                                                                                                                            | 2.7 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-preinstall-19c.x86_64 0:1.0-2.el7 will be installed
--> Processing Dependency: ksh for package: oracle-database-preinstall-19c-1.0-2.el7.x86_64
--> Processing Dependency: libaio-devel for package: oracle-database-preinstall-19c-1.0-2.el7.x86_64
--> Running transaction check
---> Package ksh.x86_64 0:20120801-142.0.1.el7 will be installed
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=============================================================================================================================================================
 Package                                            Arch                       Version                                  Repository                      Size
=============================================================================================================================================================
Installing:
 oracle-database-preinstall-19c                     x86_64                     1.0-2.el7                                ol7_latest                      19 k
Installing for dependencies:
 ksh                                                x86_64                     20120801-142.0.1.el7                     ol7_latest                     882 k
 libaio-devel                                       x86_64                     0.3.109-13.el7                           ol7_latest                      12 k
 
Transaction Summary
=============================================================================================================================================================
Install  1 Package (+2 Dependent packages)
 
Total size: 914 k
Installed size: 3.2 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : ksh-20120801-142.0.1.el7.x86_64                                                                                                           1/3 
  Installing : libaio-devel-0.3.109-13.el7.x86_64                                                                                                        2/3 
  Installing : oracle-database-preinstall-19c-1.0-2.el7.x86_64                                                                                           3/3 
  Verifying  : oracle-database-preinstall-19c-1.0-2.el7.x86_64                                                                                           1/3 
  Verifying  : libaio-devel-0.3.109-13.el7.x86_64                                                                                                        2/3 
  Verifying  : ksh-20120801-142.0.1.el7.x86_64                                                                                                           3/3 
 
Installed:
  oracle-database-preinstall-19c.x86_64 0:1.0-2.el7                                                                                                          
 
Dependency Installed:
  ksh.x86_64 0:20120801-142.0.1.el7                                           libaio-devel.x86_64 0:0.3.109-13.el7                                          
 
Complete!

정상적으로 완료됨



원인 : Oracle Linux 가 아닌데 Oracle Yum Repository를 사용해서 발생한 문제

Oracle Linux 라면 GPG key가 정상적으로 있을텐데 

Redhat Linux에 Oracle Linux Yum Repository를 사용하게끔 한뒤 yum명령을 사용해서 

Oracle GPG key가 없어서 발생한 문제



참조 : https://positivemh.tistory.com/650