라이브러리가로드되지 않음 : /usr/local/opt/readline/lib/libreadline.6.2.dylib
방금 homebrew와 함께 posgresql을 설치했으며 명령을 입력 할 때
psql
다음과 같은 오류가 발생합니다.
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.2.dylib
Referenced from: /usr/local/bin/psql
Reason: image not found
[1] 69711 trace trap psql
누구든지 무엇이 잘못되었는지 알고 있습니까?
나는 똑같은 오류가 발생했지만 위의 답변은 효과가 없었습니다. postgresql을 다시 설치해야했습니다.
brew reinstall postgresql
중요한 문제는 postgresql이 찾으려고 libreadline.6.2.dylib
하지만 readline
is는 version 7.0
이므로 7의 lib 만 연결되어 있다는 것입니다.
postgresql을 업그레이드하는 것은 좋은 생각이라고 생각하지 않습니다. 쉬운 일이 아니며 특히 데이터베이스 데이터가있는 경우 많은 문제가 발생할 수 있습니다.
내가하는 일은의 버전을 전환하는 것입니다 readline
. 확인하면 brew info readline
다른 버전을 찾을 수 있습니다. mine is 6.3.8
이므로 다음을 실행하여 해당 버전으로 전환합니다.
$ brew switch readline 6.3.8
6.3.8로 변경되고 링크가 작성됩니다.
Cleaning /usr/local/Cellar/readline/6.3.8
Cleaning /usr/local/Cellar/readline/7.0.1
Opt link created for /usr/local/Cellar/readline/6.3.8
이 경우 연결된 모든 lib가 6 버전이되고 명령 줄이 작동합니다.
$ ls /usr/local/opt/readline/lib/
libhistory.6.2.dylib libhistory.dylib libreadline.a
libhistory.6.3.dylib libreadline.6.2.dylib libreadline.dylib
libhistory.6.dylib libreadline.6.3.dylib
libhistory.a libreadline.6.dylib
그러나 다른 버전의 readline을 사용하는 앱이 다른 경우 업그레이드를 고려해야한다고 생각합니다.
업데이트 : 06/02/2019
이전 버전이 설치되어 있지 않으면 어떻게합니까?
Homebrew
이전 버전 공식을 설치하는 방법을 제공하지 않습니다. v2.0.0부터는 brew cleanup
30 일마다 기본 동작으로 실행 됩니다. 따라서 실수로 brew
이전 버전을 업데이트 하고 삭제할 수 있습니다 .
이전 버전을 설치하는 단계는 다음과 같습니다.
homebrew-core
디렉토리로 이동하십시오 .
$ cd $(brew --repository)/Library/Taps/homebrew/homebrew-core
- 이전 수식의 해시를 확인하십시오.
$ git log master -- Formula/readline.rb
- 해시 값의 해당 버전을 찾습니다.
commit 1dd4221c35716d6bec363ad3425ef93ffe7d9b9f
Author: BrewTestBot <brew-test-bot@googlegroups.com>
Date: Wed Aug 15 21:51:16 2018 +0000
readline: update 7.0.5 bottle.
- 이전 수식으로 결제 :
$ git checkout 1dd4221c35716d6bec363ad3425ef93ffe7d9b9f Formula/readline.rb
- 공식을 다시 설치하십시오.
$ brew reinstall readline
- 리포지토리 재설정
이러한 단계를 수행하면 이전 버전의 수식을 다시 설치할 수 있습니다.
If the situation is you have a higher version readline say 7.0. You can do this
cd /usr/local/opt/readline/lib
ln libreadline.7.0.dylib libreadline.6.2.dylib
If you don't have readline installed, first install it:
brew install readline
For me, I was getting this error, even though I had readline installed. Reinstalling readline did the trick:
brew reinstall readline
This worked for me
brew switch readline
This would display the versions you have installed. Pick one out of them. I picked 7.0.5
I then ran
brew switch readline 7.0.5
The readline version got updated, and psql
ran smoothly.
this worked for me
ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
The solution is to force the linking of readline again.
brew remove readline
brew install readline
brew link readline --force
It seems to me the problem is about update readline package. postgres tryied to use /usr/local/opt/readline/lib/libreadline.7.dylib in my case. So i just created a symlink to existing version of library /usr/local/opt/readline/lib/libreadline.8.dylib.
worked for me:
ln -s /usr/local/opt/readline/lib/libreadline.8.dylib /usr/local/opt/readline/lib/libreadline.7.dylib
None of those solutions worked for me; I had to run :
brew upgrade bash
from : https://github.com/Homebrew/homebrew-core/issues/5799
The answer above didn't work for me so I wanted to post what did eventually work. Based on a thread I found here, I had to uninstall readline and the install it again but from source.
brew uninstall readline
brew install --build-from-source readline
After that the psql error went away.
I had this issue, and the key for me was to reinstall
both readline
and postgres
. Once postgres was reinstalled, the issue was resolved.
I had this problem when I updated readline to version 7 by accident. I uninstalled readline and brew remind me 6.3.8 is still installed. It seems that version 7 is not working with PSQL at the moment.
I tried all these terminal commands and nothing worked so decided to fix it manually..
Open finder and hit command+shift+g
Go to this folder /usr/local/opt/readline/lib/
you should see multiple versions of these files
libreadline.6.dylib
libreadline.7.0.dylib
rename any of them to whichever library is not loaded
this is: /usr/local/opt/readline/lib/libreadline.6.2.dylib
mine was: /usr/local/opt/readline/lib/libreadline.6.dylib
Another way to fix psql is update postgresql just running brew upgrade postgresql
since the newest version will use readline 7 version.
This had helped me: uninstall all readline and postgresql
export CPPFLAGS=-I/usr/local/opt/readline/include export LDFLAGS=-L/usr/local/opt/readline/lib
and install posqtgresql
I tried all the previews answers, and nothing worked. The only thing that really worked for me was:
brew link postgresql
I found this solution helpful
brew upgrade bash
https://github.com/Homebrew/homebrew-core/issues/5799
You could try brew doctor
and see what it says.
Possibly all you need is brew link --overwrite bash
.
For me, I just upgraded brew since OS X EL Capitan had some security upgrade that affetcs my /usr
folder. During the brew upgrade, the bash link is broken, and this is what brew doctor
tells me.
So I just run brew link --overwrite bash
and everything's fine.
You might want to check if you have anything else symlinked to postgresql
. I had previously linked to the postgres93 package, which, as of May '17, is unsupported and has been removed. Removing that link and then relinking worked for me:
brew unlink postgresql93
brew link postgresql
In my case the correct answer did not fix the problem.
The problem started after running brew doctor
and adding export PATH="/usr/local/bin:$PATH"
to my ~/.zshrc file.
Removing
export PATH="/usr/local/bin:$PATH"
from ~/.zshrc
got it solved.
For some unknown reason, when this error popped up for the next version of Readline, my RVM seemed unable to locate the right one no matter how I symlinked it, throwing:
Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)
I ended up adding the gem rb-readline
to my Gemfile and doing another bundle install
and it started working.
I... just don't know.
'Programing' 카테고리의 다른 글
bash 스크립트에서 여러 프로그램을 병렬로 어떻게 실행합니까? (0) | 2020.05.01 |
---|---|
Android Studio gradle을 빌드하는 데 시간이 너무 오래 걸림 (0) | 2020.05.01 |
NodeJS를 사용하여 UTC 날짜를 YYYY-MM-DD hh : mm : ss 문자열로 포맷하는 방법은 무엇입니까? (0) | 2020.05.01 |
@property는 Objective-C에서 비 원자 유지, 할당, 복사, (0) | 2020.05.01 |
Java를 사용하여 문자열의 첫 글자를 대문자로 바꾸는 방법은 무엇입니까? (0) | 2020.05.01 |