CentOS(Amazon AMI)にNSSライブラリを再インストールします。

CentOS(Amazon AMI)にNSSライブラリを再インストールします。

Amazon(S3)のCentOS AMIでパッケージを更新するのに問題があります。

重複したパッケージをたくさん受け取りました。その中には:

nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64 is a duplicate with nss-softokn-freebl-3.16.2.3-1.13.amzn1.x86_64

重複したアイテムを削除しました。rpm -e nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64

これにより、yumその他rpmのコマンドは次のエラーで直ちに動作を停止します。

error: Failed to initialize NSS library There was a problem importing one of the Python modules required to run yum. The error leading to this problem was:

   cannot import name ts

Please install a package which provides this module, or verify that the module is installed correctly.

It's possible that the above module doesn't match the current version of Python, which is:
2.6.9 (unknown, Mar 28 2014, 00:06:37)  [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)]

If you cannot solve this problem yourself, please go to  the yum faq at:   http://yum.baseurl.org/wiki/Faq

rpmerror: Failed to initialize NSS library

など。

コマンドなしでサーバーを回復(再インストール)する方法を知っていますかnss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64? (もちろんNSSにも依存しています)?rpmrpm2cpio

または、Pythonがインストールされている他のNSSバージョンを使用するようにしますか?

ベストアンサー1

今日も同様の問題が発生しました。

rpm -e --nodeps sqlit ...rpmを使用しましたが、次の問題が発生しました。

# rpm 
error: Failed to initialize NSS library

このリンクは私が問題から抜け出すのを助けました。 https://ask.fedoraproject.org/en/question/75684/how-to-recover-yumdnfrpm-after-uninstall-sqlite/

重要なコマンドは次のとおりです。

「sqlite-3.8.10.2-1.fc22.x86_64.rpm」は単なるデモrpmです。

# rpm2cpio sqlite-3.8.10.2-1.fc22.x86_64.rpm | cpio -idmv 
Retrieving the sqlite-3.8.10.2-1.fc22.x86_64.rpm  package to cpio format.
#rpm -ivh sqlite 
Install sqlite 

これでrpm / yum / dnfが再び表示されます。

おすすめ記事