我正在使用 OS X 10.6.4。我一直在使用 clbuild 来安装 SBCL 的支持库(包括 clsql),并且我通过 Aquamacs 完成所有工作。我使用Hive Logic 的优秀说明安装了 MySQL。但是当我调用 (require 'clsql)
——这似乎工作正常——然后尝试执行 (clsql:connect '(nil "lisp" "root" "") :数据库类型:mysql)
连接到我的本地运行数据库,我收到此错误消息:
erred while invoking #<COMPILE-OP (:VERBOSE NIL) {12096109}> on
#<CLSQL-MYSQL-SOURCE-FILE "clsql_mysql" {1208E071}>
[Condition of type ASDF:OPERATION-ERROR]
从我对这个问题的研究,我认为它来自于我没有 libmysqlclient.dylib 文件的编译版本,我在 /usr/local/mysql/lib/ 中有一个副本,但我不清楚如何编译它。 这个论坛帖子似乎说这正是我的意思需要做,但该目录中没有 make 文件。
I'm working on OS X 10.6.4. I've been using clbuild to install supporting libraries for SBCL (including clsql), and I do all my work through Aquamacs. I installed MySQL using the excellent instructions over at Hive Logic. But when I call (require 'clsql)
-- which seems to work fine -- and then try to execute (clsql:connect '(nil "lisp" "root" "") :database-type :mysql)
to connect to my local running database, I get this error message:
erred while invoking #<COMPILE-OP (:VERBOSE NIL) {12096109}> on
#<CLSQL-MYSQL-SOURCE-FILE "clsql_mysql" {1208E071}>
[Condition of type ASDF:OPERATION-ERROR]
From my research of this problem, I think it comes from me not having a compiled version of the libmysqlclient.dylib file, of which I have a copy in /usr/local/mysql/lib/, but I'm not clear on how to go about compiling it. This forum post seems to say that's exactly what I need to do, but there's no make file in that directory.
发布评论
评论(2)
现在,您应该使用 homebrew 在 Snow Leopard 上安装 MySQL。 Homebrew 安装 MySQL 5.5.10,它没有 5.5.8 的编译器问题(AFAIK)。
Nowadays, you should use homebrew for MySQL installation on Snow Leopard. Homebrew installs MySQL 5.5.10 which doesn't have the compiler problem that 5.5.8 had (AFAIK).
我猜你可以从 mysql-5.5.8-osx10.6-x86_64.dmg ="nofollow">http://dev.mysql.com/downloads/mysql/#downloads
我希望包含预编译的客户端库。不过我还没试过。
如果它确实没有预编译的客户端库,您可能需要从同一位置下载 MySQL 源代码(从“选择平台”下拉框中选择“源代码”)并编译它。尽管描述说“Generic Linux”,我认为 mysql-5.5.8.tar.gz 应该可以工作。
之前在 Leopard 上安装过 MySQL 5.0,我确信它附带了客户端库,但当然有些东西可能会发生变化。他们似乎不太可能不提供它们。
编辑:
安装 OS X 10.5 的版本后,这是我在客户端库方面找到的:
所以它们确实与服务器一起安装。
I would guess you can download
mysql-5.5.8-osx10.6-x86_64.dmg
from http://dev.mysql.com/downloads/mysql/#downloadsI would expect that to include the precompiled client libs. I haven't tried it though.
If it really doesn't have the precompiled client libs, you'll probably need to download the MySQL source code from the same place (select "Source Code" from the "Select Platform" dropdown box) and compile it. Even though the description says "Generic Linux" I think mysql-5.5.8.tar.gz should work.
Having previously installed MySQL 5.0 on Leopard, I am sure it came with the client libs, but of course something could have changed. It just seems unlikely they would not provide them.
EDIT:
After installing the version for OS X 10.5, this is what I find in terms of client libs:
so they are indeed installed along with the server.