LoginSignup
14
14

More than 5 years have passed since last update.

CentOS6でyum updateするとgitでコケる時の対処法

Posted at

さくらのVPSで使ってるCentOS6.3でyum updateするとコケるのでその対策

エラーメッセージ

以下がエラーメッセージの抜粋

Error: Package: git-1.7.6.1-1.el5.rf.i386 (rpmforge)
Requires: libcurl.so.3
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

知っておくこと

git-1.7.6.1-1.el5.rf.i386 の el5
RedHat Enterprise LinuxのEnterprise Linuxの略で、
CentOSのバージョンとRedhat Enterpriseのバージョンは一致する。

問題だったこと

・/etc/yum.repos.d/rpmforge.repo がCentOS5用だった。

おそらくさくらのVPSを一度移行させるときにCentOSのバージョンが変わってたのにそれにさえ気づかずそのまま全部移行しちゃってたっぽい。

解決策

・rpmforgeのrepoをel6に変える。

まず /etc/yum.repos.d/rpmforge.repo の中のel5になってる部分をel6に書き換える。

yum clean allしてyumのキャッシュを消す。(これがわからなくてかなり時間を費やした…。)

あとは sudo yum update すれば全部綺麗にアップデート出来ました!

参考サイトとか

http://qa.atmarkit.co.jp/q/2989
で質問しました。

参考にさせてもらったサイト。
https://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=33231&forum=56

14
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
14