跳到主要內容

CentOS 3 無法使用 yum 安裝套件. 解決 yum Error: Could not find the GPG Key necessary to validate pkg 的方法

使用yum 安裝新套件的時候, 出現類似以下的錯誤:

warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 025e513b
Error: Could not find the GPG Key necessary to validate pkg /var/cache/yum/update/packages/php-mysql-4.3.2-54.ent.i386.rpm
Error: You may want to run yum clean or remove the file:
 /var/cache/yum/update/packages/php-mysql-4.3.2-54.ent.i386.rpm

這是因為CentOS 3 似乎沒有將GPG Keys 安裝進伺服器.

解決的方法, 可以在這個網站 http://mirror.centos.org/centos/ 找到GPG Keys 並且安裝.  因為是使用CENTOS 3, 因此要抓 RPM-GPG-KEY-CentOS-3
[root@centos3 html]# cat /etc/*release
LSB_VERSION="1.3"
CentOS release 3.9 (Final)

解決的方法如下:
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-3

留言

這個網誌中的熱門文章

解決Apache 2.2, 關於HTTPS 之下使用PROXY 面對的 proxy server received an invalid response from an upstream server 以及 proxy: pass request body failed 的問題

修改以下 (proxy 以及 從proxy 接收的server): httpd.conf: ----------- 在 Include conf.d/*.conf 的前面加入以下: LimitRequestBody 2147483647  #2Gb Timeout 24000 ProxyTimeout 24000 ProxyBadHeader Ignore ssl.conf ---------- 在各個virtualhost 裡加入以下:     SSLEngine on     SSLProxyEngine on     SSLProxyVerify none     SSLProxyCheckPeerCN off     #SSLProxyCheckPeerName off     SSLProxyProtocol +SSLv3 +TLSv1 +TLSv1.1 +TLSv1.2 以下這個只在proxy server 裡的virtualhost 設定     ProxyPass / https://REMOTE_HOST:443/ retry=1 acquire=3000 timeout=3600 Keepalive=On 

解決CentOS 8 的 failed to set locale defaulting to c.utf-8 的問題

這原因是沒有安裝好支援的語言與字型, 特別是UTF8 並沒有被安裝到 因此使用以下指令確認 localedef -i en_US -f UTF-8 en_US.UTF-8 假如出現 "[error] character map file `UTF-8' not found: No such file or directory" 或者 [error] default character map file 'ANSI_X3.4-1968' not found : No such file or directory 那就安裝UTF8 吧 yum whatprovides "*/UTF-8.gz" 如果找到的話 "UTF-8.gz" 的話 yum install "*/UTF-8.gz" -y 再執行一次: localedef -i en_US -f UTF-8 en_US.UTF-8