Mac readline - Library not loaded












8















I'm working on a Mac, Sierra 10.12.3, and I'm trying to access a PostgreSQL database via the psql command, but it threw the error



dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
Referenced from: /usr/local/bin/psql
Reason: image not found
Abort trap: 6


A day or two ago, I was working with someone and I needed to install pip, so I ran brew install pip, and it was all good. This is the first time I'm trying to run psql since then and I'm not certain that this has anything to do with my problem, but it seems likely since I haven't made any other changes.



Now I did a little detective work and found that if I went to /usr/local/opt/ there was indeed a readline alias directory that pointed to /usr/local/Cellar/readline/7.0.1 (version 7.0.1 also seeming to have gotten installed at some point - maybe as part of pip? Maybe I did it by mistake...) so it made some sense that the original error should be thrown. I changed the alias to point to /usr/local/Cellar/readline/6.3.8 and the error changed slightly:



dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
Referenced from: /usr/local/bin/psql
Reason: no suitable image found. Did find:
/usr/local/opt/readline/lib/libreadline.6.dylib: stat() failed with errno=20
Abort trap: 6


So it seems like I'm getting somewhere, but still having an issue. If anyone can shed some light on a solution, I would be forever grateful.










share|improve this question



























    8















    I'm working on a Mac, Sierra 10.12.3, and I'm trying to access a PostgreSQL database via the psql command, but it threw the error



    dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
    Referenced from: /usr/local/bin/psql
    Reason: image not found
    Abort trap: 6


    A day or two ago, I was working with someone and I needed to install pip, so I ran brew install pip, and it was all good. This is the first time I'm trying to run psql since then and I'm not certain that this has anything to do with my problem, but it seems likely since I haven't made any other changes.



    Now I did a little detective work and found that if I went to /usr/local/opt/ there was indeed a readline alias directory that pointed to /usr/local/Cellar/readline/7.0.1 (version 7.0.1 also seeming to have gotten installed at some point - maybe as part of pip? Maybe I did it by mistake...) so it made some sense that the original error should be thrown. I changed the alias to point to /usr/local/Cellar/readline/6.3.8 and the error changed slightly:



    dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
    Referenced from: /usr/local/bin/psql
    Reason: no suitable image found. Did find:
    /usr/local/opt/readline/lib/libreadline.6.dylib: stat() failed with errno=20
    Abort trap: 6


    So it seems like I'm getting somewhere, but still having an issue. If anyone can shed some light on a solution, I would be forever grateful.










    share|improve this question

























      8












      8








      8


      4






      I'm working on a Mac, Sierra 10.12.3, and I'm trying to access a PostgreSQL database via the psql command, but it threw the error



      dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
      Referenced from: /usr/local/bin/psql
      Reason: image not found
      Abort trap: 6


      A day or two ago, I was working with someone and I needed to install pip, so I ran brew install pip, and it was all good. This is the first time I'm trying to run psql since then and I'm not certain that this has anything to do with my problem, but it seems likely since I haven't made any other changes.



      Now I did a little detective work and found that if I went to /usr/local/opt/ there was indeed a readline alias directory that pointed to /usr/local/Cellar/readline/7.0.1 (version 7.0.1 also seeming to have gotten installed at some point - maybe as part of pip? Maybe I did it by mistake...) so it made some sense that the original error should be thrown. I changed the alias to point to /usr/local/Cellar/readline/6.3.8 and the error changed slightly:



      dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
      Referenced from: /usr/local/bin/psql
      Reason: no suitable image found. Did find:
      /usr/local/opt/readline/lib/libreadline.6.dylib: stat() failed with errno=20
      Abort trap: 6


      So it seems like I'm getting somewhere, but still having an issue. If anyone can shed some light on a solution, I would be forever grateful.










      share|improve this question














      I'm working on a Mac, Sierra 10.12.3, and I'm trying to access a PostgreSQL database via the psql command, but it threw the error



      dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
      Referenced from: /usr/local/bin/psql
      Reason: image not found
      Abort trap: 6


      A day or two ago, I was working with someone and I needed to install pip, so I ran brew install pip, and it was all good. This is the first time I'm trying to run psql since then and I'm not certain that this has anything to do with my problem, but it seems likely since I haven't made any other changes.



      Now I did a little detective work and found that if I went to /usr/local/opt/ there was indeed a readline alias directory that pointed to /usr/local/Cellar/readline/7.0.1 (version 7.0.1 also seeming to have gotten installed at some point - maybe as part of pip? Maybe I did it by mistake...) so it made some sense that the original error should be thrown. I changed the alias to point to /usr/local/Cellar/readline/6.3.8 and the error changed slightly:



      dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
      Referenced from: /usr/local/bin/psql
      Reason: no suitable image found. Did find:
      /usr/local/opt/readline/lib/libreadline.6.dylib: stat() failed with errno=20
      Abort trap: 6


      So it seems like I'm getting somewhere, but still having an issue. If anyone can shed some light on a solution, I would be forever grateful.







      mac readline






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 20 '17 at 23:50









      skwidbrethskwidbreth

      25119




      25119






















          2 Answers
          2






          active

          oldest

          votes


















          11














          I was able to resolve this by simply running brew switch readline 6.3.8






          share|improve this answer































            1














            my issue was due to my awk being linked to gawk



            brew unlink gawk






            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              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: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              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%2fsuperuser.com%2fquestions%2f1181015%2fmac-readline-library-not-loaded%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              11














              I was able to resolve this by simply running brew switch readline 6.3.8






              share|improve this answer




























                11














                I was able to resolve this by simply running brew switch readline 6.3.8






                share|improve this answer


























                  11












                  11








                  11







                  I was able to resolve this by simply running brew switch readline 6.3.8






                  share|improve this answer













                  I was able to resolve this by simply running brew switch readline 6.3.8







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 21 '17 at 20:13









                  skwidbrethskwidbreth

                  25119




                  25119

























                      1














                      my issue was due to my awk being linked to gawk



                      brew unlink gawk






                      share|improve this answer




























                        1














                        my issue was due to my awk being linked to gawk



                        brew unlink gawk






                        share|improve this answer


























                          1












                          1








                          1







                          my issue was due to my awk being linked to gawk



                          brew unlink gawk






                          share|improve this answer













                          my issue was due to my awk being linked to gawk



                          brew unlink gawk







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Feb 1 at 7:21









                          ScottScott

                          112




                          112






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • 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%2fsuperuser.com%2fquestions%2f1181015%2fmac-readline-library-not-loaded%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

                              flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                              Mangá

                              Eduardo VII do Reino Unido