安裝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位程序,具體的還未嘗試。