yum update錯誤Transaction Check Error解決方式

  在網上查看了yum update引起錯誤Transaction Check Error的情況可能有多種,我這裏只講述我遇到的情況:

在我執行yum update時的報錯信息如下:

Running Transaction Test


Transaction Check Error:
  file /usr/share/locale/en/LC_MESSAGES/systemtap.mo from install of systemtap-2.7-2.el6.x86_64 conflicts with file from package systemtap-client-2.5-5.el6.x86_64
  file /usr/share/locale/fr/LC_MESSAGES/systemtap.mo from install of systemtap-2.7-2.el6.x86_64 conflicts with file from package systemtap-client-2.5-5.el6.x86_64
  file /usr/share/locale/pl/LC_MESSAGES/systemtap.mo from install of systemtap-2.7-2.el6.x86_64 conflicts with file from package systemtap-client-2.5-5.el6.x86_64
  file /usr/share/locale/en/LC_MESSAGES/systemtap.mo from install of systemtap-2.7-2.el6.x86_64 conflicts with file from package systemtap-devel-2.5-5.el6.x86_64
  file /usr/share/locale/fr/LC_MESSAGES/systemtap.mo from install of systemtap-2.7-2.el6.x86_64 conflicts with file from package systemtap-devel-2.5-5.el6.x86_64
  file /usr/share/locale/pl/LC_MESSAGES/systemtap.mo from install of systemtap-2.7-2.el6.x86_64 conflicts with file from package systemtap-devel-2.5-5.el6.x86_64
  file /usr/share/locale/en/LC_MESSAGES/systemtap.mo from install of systemtap-2.7-2.el6.x86_64 conflicts with file from package systemtap-runtime-2.5-5.el6.x86_64
  file /usr/share/locale/fr/LC_MESSAGES/systemtap.mo from install of systemtap-2.7-2.el6.x86_64 conflicts with file from package systemtap-runtime-2.5-5.el6.x86_64
  file /usr/share/locale/pl/LC_MESSAGES/systemtap.mo from install of systemtap-2.7-2.el6.x86_64 conflicts with file from package systemtap-runtime-2.5-5.el6.x86_64

Error Summary

在網上搜索,有人建議把引起錯誤的package先刪掉,所以我systemtap這個包,然後yum update,成功了.但這不是根本解決問題的,因爲我必須要把卸載的包再安裝上,很不幸,當我執行yum install systemtap時仍然出現了上面的錯誤,這時仔細看出錯信息發現有兩個版本,然後解決和查看的方式如下:

    1) 按照錯誤提示我先查看了 systemtap-client :

    rpm -q systemtap-client --qf '%{NAME} %{VERSION} %{ARCH}'
    執行的結果是:
    systemtap-client 2.5 x86_64 systemtap-client 2.7 x86_64
    發現確實安裝了兩個版本的....

     2) 卸載

      執行命令:

    rpm -e --allmatches systemtap-client
      報錯了:
     error: "systemtap-client" specifies multiple packages:
     systemtap-client-2.5-5.el6.x86_64
     systemtap-client-2.7-2.el6.x86_64

     再在網上搜索一下錯誤錯誤解決方式,我是按照 該鏈接 文章的解決方式,卸載時帶上參數,執行一下命令:

     rpm -e --allmatches systemtap-client
     卸載成功了,然後把衝突的包都卸載掉,然後重新yum install systemtap,安裝成功.


  其實原則上不用這麼麻煩,可以在一開始就卸載掉衝突的包,然後直接yum update就可以了,而不用先卸載,再安裝的方式.


 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章