- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用 quicklisp 安装的 cl-ncurses 在 Ubuntu 13.04 上运行从 apt 安装的 SBCL,我遇到了通过 UFFI 加载 native ncurses 的问题。
初始 session 是这样的:
This is SBCL 1.1.1.0.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
\* (asdf:oos 'asdf:load-op :cl-ncurses)
WARNING: Unable to load ncurses.
这是正确的,因为尝试运行 ncurses 相关代码会产生:
debugger invoked on a SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR in thread
#<THREAD "main thread" RUNNING {10029C0E83}>:
Attempt to call an undefined alien function.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.
(SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR)
如果我尝试手动加载它(从 cl-ncurse 的 package.lisp 中窃取相关代码),我得到以下结果:
\* (asdf:load-system 'uffi)
T
\* (uffi:find-foreign-library "libncurses" '("/usr/local/lib64/" "/usr/local/lib/" "/lib64/" "/lib/" "/usr/lib64/" "/usr/lib/" "/usr/lib32" "/usr/lib/x86_64-linux-gnu") :types '("so" "a"))
NIL
我在其中添加了最后两个搜索路径。 libncurses5-dev 已安装且应用程序正在运行在 ncurses 上运行良好。试图在我的机器上找到 .so 文件,我得到:
% locate libncurses.so
/lib/i386-linux-gnu/libncurses.so.5
/lib/i386-linux-gnu/libncurses.so.5.9
/lib/x86_64-linux-gnu/libncurses.so.5
/lib/x86_64-linux-gnu/libncurses.so.5.9
/lib32/libncurses.so.5
/lib32/libncurses.so.5.9
/usr/lib/x86_64-linux-gnu/libncurses.so
/usr/lib32/libncurses.so
到达 libncurses.so 的路径包含在搜索路径中。关于如何让 UFFI 加载 ncurses 有什么想法吗?
最佳答案
我最终通过添加一个符号链接(symbolic link)来实现它,如下所示:
% sudo ln -s /lib/x86_64-linux-gnu/libncurses.so.5.9 /usr/lib/libncurses.so
对 64 位版本而不是 32 位版本进行符号链接(symbolic link)很重要。这个想法来自这个 github 页面:
关于ubuntu - 无法使用 UFFI 加载 libncurses,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17416504/
我正在使用 quicklisp 安装的 cl-ncurses 在 Ubuntu 13.04 上运行从 apt 安装的 SBCL,我遇到了通过 UFFI 加载 native ncurses 的问题。 初
我正在努力使用我刚刚成功的 C++ 库 在 sbcl 的 ubuntu 上编译。 我曾尝试使用 .h 文件解析器 'ah2cl' 但从 文档不清楚我是否需要 UFFI 或 CFFI(是否有 不同之
我是一名优秀的程序员,十分优秀!