When an error occurs with the ArtfulMySQL module, the following error occurs: root @ gitlab: opt # embedded-bitonLinuxIPv46UTF-8libffi, options: newlisp-h (loadoptmysql. lsp) ERR: stringexpectedinfunctionimport: libmysqlclient.
When using the Artful MySQL module error is always reported: root @ gitlab:/opt # newlispnewLISP v.10.6.0 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp-h (load/opt/mysql. lsp) ERR: string expected in function import: libmysqlclient
An error occurred while using the Artful MySQL module.
Always error:
root@gitlab:/opt# newlispnewLISP v.10.6.0 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h> (load "/opt/mysql.lsp")ERR: string expected in function import : libmysqlclient
The result shows that the path of libmysqlclient. so installed in Ubuntu 12.04 is abnormal. Use find/-name to find the path and add it to the mysql. lsp file.
;;; Find the libmysqlclient library on this system (setf is-64-bit nil)(let ((paths '("/usr/lib/libmysqlclient.so" "/usr/lib/x86_64-linux-gnu/libmysqlclient.so" ;;here "/usr/lib64/mysql/libmysqlclient.so" "/usr/local/mysql/lib/libmysqlclient.dylib" "/opt/local/lib/libmysqlclient.dylib" "/sw/lib/libmysqlclient.dylib")))
Okay, the module is loaded successfully:
> (load "/opt/mysql.lsp")MAIN
However, an error was reported when the database was connected, but it was not keeping pace with newllisp 10.6.0. Obtain the latest untested code:
git clone https://gist.github.com/10490156.git
> (load "/opt/10490156/mysql.lsp") MAIN > _MYSQL:is-64-bit true > (setf db (Mysql)) (Mysql 10710960) > (:connect db "localhost" "root" "770328" "mysql") true > (:query db "show tables") (MysqlResult 10812080) > (exit)
It seems that the test is available. The test must be completed by the author.
Http://www.newlispfanclub.alh.net/forum/viewtopic.php? F = 16 & t = 4502