使用Artful MySQL模組出錯

來源:互聯網
上載者:User

標籤:roo   檔案   sys   data-   tables   rar   ted   isp   div   

總是報錯:

[email protected]:/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

結果發現是Ubuntu 12.04下安裝的libmysqlclient.so的路徑不正常,用 find / -name尋找, 將真實路徑加入到mysql.lsp檔案裡

;;; 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")))

好了。載入模組成功:

> (load "/opt/mysql.lsp")MAIN

但是串連資料庫報錯。原來是沒有跟上newllisp 10.6.0的步伐。 如今擷取最新的未測試的代碼:

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)

似乎可用了,詳細還要等作者完畢測試。

http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=16&t=4502

f=16&t=4502">

f=16&t=4502">http://www.artfulcode.net/articles/a-better-mysql-module-for-newlisp/


使用Artful MySQL模組出錯

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.