Error reported when using the ArtfulMySQL Module

Source: Internet
Author: User
Tags setf
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.