메뉴 닫기

yum 실행후 먹통이 되어 있을때

 

아래의 경우는 일반적인 경우가 아닌 특이한 경우 발견되는 증상입니다.

# yum update
Loaded plugins: fastestmirror

대답없는 yum

kill -9 {process number}, killall -9 yum 등으로 강제종료 시켜봐도 제자리

1. 외부 네트웍과 통신이 잘되는지 점검해봅니다.

2. resolv.conf 에 이상은 없는지 점검해봅니다.

3. UDP 통신이 막혀 있는지 점검해봅니다.

위와 같은 절차에도 이상이 없다면 rpm db 에 문제가 있는 경우일 것입니다.

4. rpm -qa |grep awk 등으로 rpm 명령어가 잘 동작하는지 점검해보고,

   먹통이 되어 있다면 rpm 인덱스 db가 깨져 있는 것입니다.

5. 다음과 같이 rpm db 를 리빌드 시킵니다.

# rm -f /var/lib/rpm/__db*
# rpm -vv –rebuilddb

D: /var/lib/rpmrebuilddb.3284에 /var/lib/rpm 데이터베이스를 재구축 합니다
D: /var/lib/rpmrebuilddb.3284 디렉토리를 생성합니다
D: dbapi 3로 이전 데이터베이스를 엽니다
D: 여는중  db 환경        /var/lib/rpm/Packages create:cdb:mpool
D: 여는중  db 인덱스      /var/lib/rpm/Packages rdonly 모드=0x0
D: 잠금된  db 인덱스      /var/lib/rpm/Packages
D: dbapi 3로 새로운 데이터베이스를 엽니다
D: 여는중  db 환경        /var/lib/rpmrebuilddb.3284/Packages create:mpool
D: 여는중  db 인덱스      /var/lib/rpmrebuilddb.3284/Packages create 모드=0x42
D: 여는중  db 환경        /var/lib/rpm/Packages joinenv
D: 여는중  db 인덱스      /var/lib/rpm/Packages rdonly 모드=0x0
D: 여는중  db 인덱스      /var/lib/rpm/Pubkeys rdonly 모드=0x0
D:  read h#     866 Header sanity check: OK
D: ========== DSA pubkey id a8a447dc e8562897 (h#866)
D:  read h#       8 Header V3 DSA signature: OK, key ID e8562897
D:   +++ h#       1 Header V3 DSA signature: OK, key ID e8562897
D: 여는중  db 인덱스      /var/lib/rpmrebuilddb.3284/Name create 모드=0x42
D: Name 인덱스에 “cracklib-dicts”(을)를 추가합니다.
D: 여는중  db 인덱스      /var/lib/rpmrebuilddb.3284/Basenames create 모드=0x42
D: Basenames 인덱스에 9 항목들(entries)을 추가합니다.
D: 여는중  db 인덱스      /var/lib/rpmrebuilddb.3284/Group create 모드=0x42
D: Group 인덱스에 “System Environment/Libraries”(을)를 추가합니다.
D: 여는중  db 인덱스      /var/lib/rpmrebuilddb.3284/Requirename create 모드=0x42
D: 여는중  db 인덱스      /var/lib/rpmrebuilddb.3284/Providename create 모드=0x42
D: Providename 인덱스에 “cracklib-dicts”(을)를 추가합니다.
D: 여는중  db 인덱스      /var/lib/rpmrebuilddb.3284/Dirnames create 모드=0x42
D: Dirnames 인덱스에 4 항목들(entries)을 추가합니다.

… 중략 …

D: 닫힌    db 인덱스      /var/lib/rpm/Packages
D: 닫힌    db 환경        /var/lib/rpm/Packages
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Pubkeys
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Filemd5s
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Sha1header
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Sigmd5
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Installtid
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Provideversion
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Requireversion
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Dirnames
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Triggername
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Conflictname
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Providename
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Requirename
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Group
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Basenames
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Name
D: 닫힌    db 인덱스      /var/lib/rpmrebuilddb.3284/Packages
D: 닫힌    db 환경        /var/lib/rpmrebuilddb.3284/Packages
D: /var/lib/rpmrebuilddb.3284 디렉토리를 삭제합니다
D: 닫힌    db 인덱스      /var/lib/rpm/Pubkeys
D: 닫힌    db 인덱스      /var/lib/rpm/Packages
D: 닫힌    db 환경        /var/lib/rpm/Packages
D: May free Score board((nil))

6. RPM DB 리빌드가 완료되었다면 이제 yum update 명령을 내려봅니다.

그래도 yum update 가 안된다면 다음 몇 가지 작업으로 yum cache 를 지워봅니다.

# yum clean all

# yum clean dbcache

# yum makecache

Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: ftp.neowiz.com
 * epel: mirror.premi.st
 * extras: ftp.neowiz.com
 * updates: ftp.neowiz.com
base                                                                         | 1.1 kB     00:00
base/filelists                                                               | 3.7 MB     00:54
base/other                                                                   |  14 MB     02:11
base/group                                                                   | 1.1 MB     00:07
base/primary                                                                 | 1.3 MB     00:16
epel                                                                         | 3.7 kB     00:00
epel/filelists_db                                                            | 4.5 MB     00:00
epel/updateinfo                                                              | 494 kB     00:00
epel/other_db                                                                | 2.1 MB     00:00
epel/group_gz                                                                | 167 kB     00:00
epel/primary_db                                                              | 3.3 MB     00:00
extras                                                                       | 2.1 kB     00:00
extras/filelists_db                                                          | 224 kB     00:03
extras/other_db                                                              | 442 kB     00:02
extras/group                                                                 | 9.7 kB     00:00
extras/primary_db                                                            | 173 kB     00:01
updates                                                                      | 1.9 kB     00:00
updates/filelists_db                                                         | 1.4 MB     00:09
updates/other_db                                                             | 8.0 MB     00:57
updates/primary_db                                                           | 338 kB     00:01
base                                                                                      3667/3667
base                                                                                      3667/3667
base                                                                                      3667/3667
Metadata Cache Created

# yum update

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.neowiz.com
 * epel: mirror.premi.st
 * extras: ftp.neowiz.com
 * updates: ftp.neowiz.com
Setting up Update Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
–> Running transaction check
—> Package bind97.x86_64 32:9.7.0-21.P2.el5_11.1 set to be updated
—> Package bind97-chroot.x86_64 32:9.7.0-21.P2.el5_11.1 set to be updated
—> Package bind97-devel.i386 32:9.7.0-21.P2.el5_11.1 set to be updated
—> Package bind97-devel.x86_64 32:9.7.0-21.P2.el5_11.1 set to be updated
—> Package bind97-libs.i386 32:9.7.0-21.P2.el5_11.1 set to be updated
—> Package bind97-libs.x86_64 32:9.7.0-21.P2.el5_11.1 set to be updated
—> Package bind97-utils.x86_64 32:9.7.0-21.P2.el5_11.1 set to be updated
—> Package crash.x86_64 0:5.1.8-3.el5.centos set to be updated
—> Package cups-libs.i386 1:1.3.7-32.el5_11 set to be updated
—> Package cups-libs.x86_64 1:1.3.7-32.el5_11 set to be updated
—> Package device-mapper.i386 0:1.02.67-2.el5_11.1 set to be updated

… 중략 …

 sendmail                     x86_64        8.13.8-10.el5_11                 updates          638 k
 sendmail-cf                  x86_64        8.13.8-10.el5_11                 updates          306 k
 setroubleshoot               noarch        2.0.5-7.el5_11                   updates          134 k
 setroubleshoot-server        noarch        2.0.5-7.el5_11                   updates          1.2 M
 stunnel                      x86_64        4.15-2.el5.2                     updates          112 k
 tzdata                       x86_64        2015b-1.el5                      updates          755 k
 xorg-x11-server-Xnest        x86_64        1.1.1-48.107.el5.centos          updates          1.4 M
 xorg-x11-server-Xorg         x86_64        1.1.1-48.107.el5.centos          updates          3.4 M
 xorg-x11-server-Xvfb         x86_64        1.1.1-48.107.el5.centos          updates          1.6 M
Removing:
 kernel                       x86_64        2.6.18-371.8.1.el5               installed         99 M
 kernel-devel                 x86_64        2.6.18-371.8.1.el5               installed         16 M

Transaction Summary
====================================================================================================
Install       2 Package(s)
Upgrade      72 Package(s)
Remove        2 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Total download size: 131 M
Is this ok [y/N]:

위와 같이 보인다면 정상적으로 돌아온 것입니다.

 

  [polldaddy rating=”7739789″]  

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x