LoginSignup
19
8

More than 3 years have passed since last update.

CentOS7でMecabをyum installする時に「Check that the correct key URLs are configured for this repository.」と怒られて失敗する

Last updated at Posted at 2019-10-10

ネットの記事を参考にMecabをyum installしてみると…

ネットの記事を鵜呑みにして、以下のコマンドを順番に実行していく。

リポジトリ追加
sudo rpm -ivh http://packages.groonga.org/centos/groonga-release-1.1.0-1.noarch.rpm
パッケージ情報の更新
sudo yum makecache
MeCabと辞書データのインストール
sudo yum install mecab mecab-ipadic

すると…

The GPG keys listed for the "Groonga for CentOS 7 - x86_64" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.


 Failing package is: mecab-0.996-2.el7.1.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-groonga

えっ!?失敗!?
エラーログを見てみると、どうやらインストール時に利用する公開鍵がリポジトリに合っていないらしい。
他の記事では普通に上手く行っているのに何故…。

原因と解決方法

追加しているリポジトリが最新ではなかった事が原因でした。
Groonaの公式手順に沿って最新のリポジトリを追加したら問題なくMecabをインストールすることができました。

最新(latest-release)リポジトリ追加
sudo yum install -y https://packages.groonga.org/centos/groonga-release-latest.noarch.rpm

結構色々な記事でVer.1.1.0-1決め打ちでリポジトリ追加している手順が多いので、ご注意ください。
#参考
Groongav9.0.8ドキュメント

19
8
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
19
8