kip*_*gon 6 mac homebrew gnuplot readline
我正在更新我的 mac 上的一些程序,突然在运行 gnuplot 时遇到了一些麻烦。错误是这样的:
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
Referenced from: .../something/...
Reason: image not found
Trace/BPT trap: 5
Run Code Online (Sandbox Code Playgroud)
这不是我自己的错误(我从互联网上复制粘贴了这个非常接近的错误),因为从那时起我卸载了 gnuplot 并且无法再安装它。
当我运行时brew install gnuplot
,我得到:
Warning: You are using macOS 10.11.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you experience, as you are running this old version.
==> Installing dependencies for gnuplot: graphite2, harfbuzz, pango and qt
==> Installing gnuplot dependency: graphite2
==> Downloading https://github.com/silnrsi/graphite/releases/download/1.3.13/gra
Already downloaded: /Users/me/Library/Caches/Homebrew/downloads/e37be24d841649b167ec4be5e60ac444d5ec859aa32d694e93df5ff36c05b2bf--graphite2-1.3.13.tgz
==> cmake -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -D
Last 15 lines from /Users/me/Library/Logs/Homebrew/graphite2/01.cmake:
2019-01-29 12:04:38 +0100
cmake
-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/graphite2/1.3.13
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_FIND_FRAMEWORK=LAST
-DCMAKE_VERBOSE_MAKEFILE=ON
-Wno-dev
-DHAVE_CLOCK_GETTIME:INTERNAL=0
CMake Error: No source or binary directory provided
Do not report this issue to Homebrew/brew or Homebrew/core!
These open issues may also help:
Update graphite2 to reference src dir in cmake https://github.com/Homebrew/homebrew-core/pull/36376
Error: You are using macOS 10.11.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you experience, as you are running this old version.
Run Code Online (Sandbox Code Playgroud)
在我从 sourceForge 下载 gnuplot 的安装文件中,我可以阅读:
Readline issues:
As I understand the situation, Apple ships OSX with a "fake" libreadline shared
library. The file /usr/lib/libreadline.dylib is really a symlink to a compatibility
layer over the BSD libedit library. But the compatibility isn't complete, and in
particular it is missing some routines used for readline support by gnuplot. The
./configure script should be able to cope with this. But you will still be left
without some of the functionality of the "real" libreadline. For one thing,
libedit doesn't handle UTF-8 input.
You have several options:
1) Delete the fake libreadline libraries from OSX and install the real gnu
libreadline as a system library.
2) Install the real gnu libreadline into your personal account and tell gnuplot
to use it: ./configure --with-readline=/my/private/readline/installdir
This may require some playing around with additional -L and -I definitions in
CFLAGS, and is probably harder than replacing the system copy of the library.
3) Use gnuplot's built-in readline routines. These now support UTF-8 input and
tab-completion of file names. ./configure --with-readline=builtin
Run Code Online (Sandbox Code Playgroud)
你知道我怎么能用 brew 做第二个选项吗?
非常感谢
编辑 :
我已经尝试:brew switch readline 8.0.0
和brew install gnuplot --with-readline=/usr/local/Cellar/readline/8.0.0/lib
,但它不工作...
小智 18
我在尝试运行 gnuplot 的 macOS 计算机中遇到了完全相同的问题。为了解决这个问题,我尝试了在互联网上找到的几个建议,但没有一个对我有用。例如更新/升级 brew、删除、安装和重新安装 readline、升级 bash 和许多其他事情。
所以,我最近解决了这个问题。在接下来的几行中,我试图描述我所做的过程。
cd
到libreadline.7.dylib
必须在的位置,在这种情况下/usr/local/opt/readline/lib/
当我列出时,我只找到了libreadline.8.0.dylib
和软链接libreadline.8.dylib
。
我创建了一个指向libreadline.8.0.dylib
库的新软链接,以创建 gnuplot 查找的软链接,在本例中是编号为 7 的库libreadline.7.dylib
:
$ sudo ln -s libreadline.8.0.dylib libreadline.7.dylib
Run Code Online (Sandbox Code Playgroud)就这样。也许您需要重新启动终端或命令行应用程序。
小智 5
如果它有帮助的话:我遇到了类似的错误消息,发现 gnuplot 依赖于 gawk,并且自动安装的 gawk 版本需要过时版本的 readline。我的 gnuplot 二进制文件引用了正确的版本。您可以使用以下方法进行验证otool
:
Gawk 引用 libreadline.7.dylib
$ otool -L /usr/local/bin/awk | grep -i read
/usr/local/opt/readline/lib/libreadline.7.dylib (compatibility version 7.0.0, current version 7.0.0)
Run Code Online (Sandbox Code Playgroud)
如果您遇到同样的问题,我相信您应该能够升级gawk
。
$ brew upgrade gawk
==> Upgrading 1 outdated package:
gawk 4.2.0_1 -> 4.2.1_1
==> Upgrading gawk
==> Downloading https://homebrew.bintray.com/bottles/gawk-4.2.1_1.mojave.bottle.
######################################################################## 100.0%
==> Pouring gawk-4.2.1_1.mojave.bottle.1.tar.gz
/usr/local/Cellar/gawk/4.2.1_1: 87 files, 4.7MB
Removing: /usr/local/Cellar/gawk/4.2.0_1... (69 files, 3MB)
$ otool -L /usr/local/bin/awk | grep -i read
/usr/local/opt/readline/lib/libreadline.8.dylib (compatibility version 8.0.0, current version 8.0.0)
Run Code Online (Sandbox Code Playgroud)
这是我安装的 gnuplot 版本。
brew info gnuplot
gnuplot: stable 5.2.6 (bottled), HEAD
Command-driven, interactive function plotting
http://www.gnuplot.info/
/usr/local/Cellar/gnuplot/5.2.6_1 (48 files, 2.9MB) *
Run Code Online (Sandbox Code Playgroud)
如果 /usr/local 中有任何其他依赖于旧 readline 的二进制文件,您可以使用以下命令快速找到它们:
for i in /usr/local/bin/* ; do if otool -L $i | grep -i libreadline.7; then echo "\t^ used by $i\n"; fi; done
Run Code Online (Sandbox Code Playgroud)
然后你可能会幸运地升级它们。
归档时间: |
|
查看次数: |
9666 次 |
最近记录: |