安装cl+ssl提示缺少libcrypto_1-1.dll,libcrypto-1_1-x64.dll,libssl-1_1.dll,libssl-1_1-x64.dll
首先openssl的官网下载了openssl-1.1.1d的源码然后分别编译了64位和32位的,得到了4个文件libcrypto_1-1.dll,libcrypto-1_1-x64.dll,libssl-1_1.dll,libssl-1_1-x64.dll.
然后,这4个文件的目录假设为"d:/apple/banana/melon/openssl-1.1.1d/libcrypto_1-1.dll"等等
要修改的地方在cl+ssl包的源码:src/reload.lisp中(例如说我这里是"...\i686\.emacs.d\.quicklisp\dists\quicklisp\software\cl+ssl-20211020-git\src\reload.lisp"),
(unless cl+ssl/config::*libcrypto-override*
(cffi:define-foreign-library libcrypto
(:windows (:or #+(and windows x86-64) "[这里是要修改的地方]"
#+(and windows x86) "[这里也是要修改的地方]"
"libeay32.dll"))
...后面省略
在修改的地方填上对应的dll文件的目录即可,注意x86-64要对应64位的dll,x86对应32位dll。就像这样:
(unless cl+ssl/config::*libcrypto-override*
(cffi:define-foreign-library libcrypto
(:windows (:or #+(and windows x86-64) "d:/apple/banana/melon/openssl-1.1.1d/libcrypto_1-1-x64.dll"
#+(and windows x86) "d:/apple/banana/melon/openssl-1.1.1d/libcrypto_1-1.dll"
"libeay32.dll"))
...后面省略
同理,libssl-1_1-x64.dll和libssl-1_1.dll的问题的修改方法类似,要改的地方就在同一个文件中
(unless cl+ssl/config::*libssl-override*
(cffi:define-foreign-library libssl
(:windows (:or #+(and windows x86-64) "d:/apple/banana/melon/openssl-1.1.1d/libssl-1_1-x64.dll"
#+(and windows x86) "d:/apple/banana/melon/openssl-1.1.1d/libssl-1_1.dll"
"libssl32.dll"
"ssleay32.dll"))
...后面省略
保存文件reload.lisp。
安装cl-readline提示缺少libreadline.dll
同样的,要修改的地方在cl-readline包的源码的cl-readline.lisp的开头,
(define-foreign-library readline
;; On OSX we first search readline, installed by brew install readline
;; because native system version of readline is a symlink to libedit.
;; Some people on the internet advice to "fix" it by running:
;; brew link --force readline
;; but it is a bad idea, because this command may break some system utilities,
;; depending on libedit's internals.
(:darwin (:or "/usr/local/opt/readline/lib/libreadline.dylib"
"/opt/homebrew/opt/readline/lib/libreadline.dylib"
"libreadline.dylib"))
(:unix (:or "libreadline.so.6.3"
"libreadline.so.6"
"libreadline.so.7"
"libreadline.so.8"
"libreadline.so"))
;;(t (:default "libreadline"))
(t (:default "[这里是要修改的地方]"))
)
...后面省略
然后可以在https://nchc.dl.sourceforge.net/project/gnuwin32/readline/5.0-1/readline-5.0-1-bin.zip这个网址下载readline5.dll,这里有个要注意的地方,比如,你将下载下来的dll文件保存,路径为"d:/apple/banana/melon/libreadline/readline5.dll",如果你直接将这个填上去会报错。而应该这样:
(t (:default "d:/apple/banana/melon/libreadline/readline5"))
...后面省略
推测可能是内部函数做了处理,加了后缀名什么的。
另外,我在windows的cmd中运行lisp-chat-client包里的main函数,有显示bug,可能在linux下没啥问题吧。而且lisp-chat还能以python方式启动,具体看它的readme吧。
另外,另一种方式,手动编译出libreadline.dll可能要从cygwin中下载libreadline包的源码,然后手动编译,而且cl-readline包似乎只接受32位程序,具体的还未尝试。