Reinstaling NSS library on CentOS (Amazon AMI)












1














I had a problem during updating of the packages on CentOS AMI from Amazon (S3).



I got a bunch of duplicated packages. Among them:



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


I've removed a duplicate with rpm -e nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64



This caused the yum, rpm and other commands to immediately stop working with errors like this:



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



etc.



Any idea how to fix the server (reinstall nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64) without rpm command, rpm2cpio (also depends on NSS apparently)?



Or make Python use the other installed NSS version?










share|improve this question





























    1














    I had a problem during updating of the packages on CentOS AMI from Amazon (S3).



    I got a bunch of duplicated packages. Among them:



    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


    I've removed a duplicate with rpm -e nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64



    This caused the yum, rpm and other commands to immediately stop working with errors like this:



    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



    etc.



    Any idea how to fix the server (reinstall nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64) without rpm command, rpm2cpio (also depends on NSS apparently)?



    Or make Python use the other installed NSS version?










    share|improve this question



























      1












      1








      1







      I had a problem during updating of the packages on CentOS AMI from Amazon (S3).



      I got a bunch of duplicated packages. Among them:



      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


      I've removed a duplicate with rpm -e nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64



      This caused the yum, rpm and other commands to immediately stop working with errors like this:



      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



      etc.



      Any idea how to fix the server (reinstall nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64) without rpm command, rpm2cpio (also depends on NSS apparently)?



      Or make Python use the other installed NSS version?










      share|improve this question















      I had a problem during updating of the packages on CentOS AMI from Amazon (S3).



      I got a bunch of duplicated packages. Among them:



      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


      I've removed a duplicate with rpm -e nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64



      This caused the yum, rpm and other commands to immediately stop working with errors like this:



      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



      etc.



      Any idea how to fix the server (reinstall nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64) without rpm command, rpm2cpio (also depends on NSS apparently)?



      Or make Python use the other installed NSS version?







      centos rpm nss






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 5 '16 at 20:53









      thrig

      24.2k22956




      24.2k22956










      asked Jun 16 '16 at 16:38









      Marcin Raczkowski

      15116




      15116






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Today I meet a similar problems like this.



          I use rpm -e --nodeps sqlit ...rpm
          then the problem occur like below.



          # rpm 
          error: Failed to initialize NSS library


          This link help me out of the trouble.
          https://ask.fedoraproject.org/en/question/75684/how-to-recover-yumdnfrpm-after-uninstall-sqlite/



          The core command is here :



          "sqlite-3.8.10.2-1.fc22.x86_64.rpm" Just as a demo 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


          Then your rpm / yum / dnf will be back .






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f290192%2freinstaling-nss-library-on-centos-amazon-ami%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Today I meet a similar problems like this.



            I use rpm -e --nodeps sqlit ...rpm
            then the problem occur like below.



            # rpm 
            error: Failed to initialize NSS library


            This link help me out of the trouble.
            https://ask.fedoraproject.org/en/question/75684/how-to-recover-yumdnfrpm-after-uninstall-sqlite/



            The core command is here :



            "sqlite-3.8.10.2-1.fc22.x86_64.rpm" Just as a demo 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


            Then your rpm / yum / dnf will be back .






            share|improve this answer


























              0














              Today I meet a similar problems like this.



              I use rpm -e --nodeps sqlit ...rpm
              then the problem occur like below.



              # rpm 
              error: Failed to initialize NSS library


              This link help me out of the trouble.
              https://ask.fedoraproject.org/en/question/75684/how-to-recover-yumdnfrpm-after-uninstall-sqlite/



              The core command is here :



              "sqlite-3.8.10.2-1.fc22.x86_64.rpm" Just as a demo 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


              Then your rpm / yum / dnf will be back .






              share|improve this answer
























                0












                0








                0






                Today I meet a similar problems like this.



                I use rpm -e --nodeps sqlit ...rpm
                then the problem occur like below.



                # rpm 
                error: Failed to initialize NSS library


                This link help me out of the trouble.
                https://ask.fedoraproject.org/en/question/75684/how-to-recover-yumdnfrpm-after-uninstall-sqlite/



                The core command is here :



                "sqlite-3.8.10.2-1.fc22.x86_64.rpm" Just as a demo 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


                Then your rpm / yum / dnf will be back .






                share|improve this answer












                Today I meet a similar problems like this.



                I use rpm -e --nodeps sqlit ...rpm
                then the problem occur like below.



                # rpm 
                error: Failed to initialize NSS library


                This link help me out of the trouble.
                https://ask.fedoraproject.org/en/question/75684/how-to-recover-yumdnfrpm-after-uninstall-sqlite/



                The core command is here :



                "sqlite-3.8.10.2-1.fc22.x86_64.rpm" Just as a demo 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


                Then your rpm / yum / dnf will be back .







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered May 27 '17 at 4:59









                Alopex

                11




                11






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f290192%2freinstaling-nss-library-on-centos-amazon-ami%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Morgemoulin

                    Scott Moir

                    Souastre