gpt4 book ai didi

macos - 如何在 macOS 中链接到 GNU readline 库而不是 libedit?

转载 作者:行者123 更新时间:2023-12-01 16:50:00 28 4
gpt4 key购买 nike

尝试在 macosx 上构建 Term-Readline-Gnu,但未能提示 libedit 并建议使用 gnu readline。我该怎么做?

这是我尝试过的尝试之一:

首先我静态构建了 GNU libreadline v6.2 但没有安装它 - 到确保我没有搞砸同名的系统版本:

./configure --prefix=/Users/Fred/Downloads/tmp1

make

make install-static

然后尝试构建Term_Readline-Gnu-1.20

cmc:Term-ReadLine-Gnu-1.20 cmc$ perl Makefile.PL --includedir=/Users/cmc/Downloads/tmp1/include --libdir=/Users/Fred/Downloads/tmp1/lib

Found `/usr/lib/libtermcap.dylib'.

gcc-4.2 -I/Users/Fred/Downloads/tmp1/include -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -DHAVE_STRING_H rlver.c -o rlver -L/Users/Fred/Downloads/tmp1/lib -arch x86_64 -arch i386 -arch ppc -L/usr/local/lib -lreadline -ltermcap

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

The libreadline you are using is the libedit library. Use the GNU Readline Library.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

克里斯

最佳答案

Here这是一篇很棒的文章,解释了如何通过几个简单的步骤解决 OP 的问题:

brew install readline

brew link --force readline

cpanm Term::ReadLine::Gnu

brew 取消链接 readline

检查

brew info readline | head -1

关于macos - 如何在 macOS 中链接到 GNU readline 库而不是 libedit?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7214374/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com