yum-complete-transaction 명령어 및 yum 오류 해결 solution > 개발

본문 바로가기
사이트 내 전체검색

개발

yum-complete-transaction 명령어 및 yum 오류 해결 solution

페이지 정보

profile_image
작성자 관리자 (61.♡.26.29)
댓글 0건 조회 5,065회 작성일 17-07-14 10:51

본문

yum 을 업데이트 할 때, 다음과 같은 메시지가 나온다.

Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
(어쩌고 저쩌고)

그래서 해 봤다.
# yum-complete-transaction

해보니, 설치된 패키지 전체를 검사하는 모양이다.
중간중간에 아래와 같은 것들이 보인다.

Package matching ***** already installed. Checking for update.

마지막에 나오는 것이.. 삭제할 것, 수정할 것, 업데이트할 것 등을 알려 준다.
그리고,
Is this ok [y/N]: _

y 를 누르면?

알아서 패키지들을 삭제 수정 업그레이드 해 준다.

그런데, 그런 후에 다시 yum-complete-transaction 을 해 보면, 또다시 뭐가 나올 수도 있다.
또다시.. 삭제할 것, 수정할 것, 업데이트할 것 등이 있다고 알려 준다. 헐~

그럼 역시 y 를 누른다.

두번을 하니, 더이상 뭐가 안나온다.

# yum-complete-transaction
....
No unfinished transaction left.

라고 떨어진다.



ㅁ Not removing old transaction files

위 명령어로 여전히 에러가 계속 나오는 경우는 아래 명령어로 클린업만 할 수도 있다.
# yum-complete-transaction --cleanup-only

* 참고
https://unix.stackexchange.com/questions/475631/yum-get-rid-of-unfinished-transactions-remaining



ㅁ package-cleanup 명령어

위의 yum-complete-transaction 명령에도 불구하고 아래와 같은 오류가 난다면, 시도해 볼수 있는 명령어다.

# yum -y update
....
Transaction check error:
    package .... is already installed
    package .... is already installed
....

이런 오류는 한 패키지가 여러 버전이 설치되어 있을 경우에 발생하는 듯 하다.

중복으로 설치된 패키지를 확인해 보는 명령어
# package-cleanup --dupes

중복설치된 패키지의 버전 중 낮은 버전의 패키지를 remove 시켜주는 명령어
# package-cleanup --cleandupes

이 명령어는 중간에 confirm 하는 과정이 들어 있어서 -y 옵션을 추가할 수도 있다.
주의할 점은, package-cleanup 명령어는 yum-utils 패키지 안에 있다.
# yum install yum-utils

package-cleanup --cleandupes 명령이 완료된 후에 아래와 같은 메시지가 나온다면,
Warning: Some duplicates were not removed because they are required by installed packages.
You can try --cleandupes with --removenewestdupes, or review them with --dupes and remove manually.

시키는대로 한다.
# package-cleanup --cleandupes --removenewestdupes

이 명령어는 중복되는 패키지중에서 나중 버전의 패키지를 삭제한다.
역시 중간에 confirm 하는 과정이 있다.


ㅇ 참고
https://access.redhat.com/solutions/158883
https://forums.centos.org/viewtopic.php?t=45845



ㅁ rpmdb rebuild

그래도 여전히 에러가 나오는 경우에는 rpmdb 를 rebuild 해 본다.
https://www.baragi.net/bbs/board.php?bo_table=server&wr_id=8630



ㅁ yum update --skip-broken

yum update 시 계속 Killed 가 나온다면, --skip-broken 옵션을 줘 볼수도 있다
# yum update --skip-broken

** 중요
서버의 가용 메모리가 부족한 경우, yum update 를 하면 killed 가 나온다.
계속 killed 가 나오면, 서버의 메모리를 확보한 후에 다시 시도해 보자.



ㅁ 기타 yum 오류 참고

https://www.lesstif.com/pages/viewpage.action?pageId=14745755
https://kldp.org/node/123468



ㅁ yumdownloader 로 해당 rpm 을 다운받아서 설치하기

우선, yumdownloader 명령어는 yum-utils 패키지안에 있으므로, 해당 패키지를 설치해야 한다.
 
# yumdownloader java-1.7.0-openjdk
# rpm -Uvh java-1.7.0-openjdk*

의존성 실패가 나올 경우 강제설치
# rpm -Uvh --force java-1.7.0-openjdk*

그래도 의존성 어쩌고 저쩌고 나올때는, 의존성 무시 설치
# rpm -Uvh --nodeps java-1.7.0-openjdk*

추천0

댓글목록

등록된 댓글이 없습니다.

Total 386건 7 페이지
  • RSS

검색


사이트 정보

Copyright © Baragi.Net. All rights reserved.