【问题标题】:Multiple sqlite installs on same server在同一台服务器上安装多个 sqlite
【发布时间】:2011-09-09 18:20:44
【问题描述】:

我有一个服务器在工作,我基本上是在构建一个 apache/mysql/subversion/php/python 开发基础。我发现服务器指向的 RPM 存储库只有 3.3.6-5 版本的 sqlite,而它的颠覆 1.6.17 扼杀,至少需要 3.4 版本:

An appropriate version of sqlite could not be found.  We recommmend 3.6.13,
but require at least 3.4.0. Please either install a newer sqlite on this
system or get the sqlite 3.6.13 amalgamation from:
http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz
unpack the archive using tar/gunzip and copy sqlite3.c from the
resulting directory to:
/root/installs/subversion-1.6.17/sqlite-amalgamation/sqlite3.c
This file also ships as part of the subversion-deps distribution.

我设法下载并构建了 sqlite (sqlite-autoconf-3070701.tar.gz),但现在当我运行 sqlite3 时,我收到了错误:

sqlite3: symbol lookup error: sqlite3: undefined symbol: sqlite3_sourceid

我确定这是因为 PATH 变量具有用于 sqlite 的 rpm 安装 (/usr) 和我安装的编译版本 (/usr/local) 的 so 文件。我不能 yum 删除现有的 sqlite,因为它与 rpm 的安装相关,所以我想做的是将我需要的任何内容添加到我的配置文件或 bashrc 或任何其他需要允许某些用户运行的黑魔法更新了 sqlite 安装,而其他人则默认为原始安装。

其他信息:

# cat /etc/*-release
Enterprise Linux Enterprise Linux Server release 5.6 (Carthage)
Oracle Linux Server release 5.6
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
# uname -m
x86_64

谁能告诉我怎样才能让两个 sqlite 副本很好地一起玩?

【问题讨论】:

    标签: linux sqlite installation configure


    【解决方案1】:

    您是否尝试过来自 subversion 的错误消息建议的内容?

    ...从以下位置获取 sqlite 3.6.13 合并: http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz解压 使用 tar/gunzip 归档并从结果中复制 sqlite3.c 目录到: /root/installs/subversion-1.6.17/sqlite-amalgamation/sqlite3.c

    【讨论】:

    • 说实话,我不太了解什么是“合并”。我宁愿有mos
    • 合并意味着所有 sqlite C代码都在一个文件中(sqlite3.c);根据错误消息,您将其复制到 /root/installs/subversion-1.6.17/sqlite-amalgamation/ 然后 subversion 应该能够使用它。
    • 糟糕 - 让我们再试一次。说实话,我不太了解什么是“合并”。我宁愿让最新版本的 sqlite 与 subversion 一起使用 - 而不是 API 屏蔽的旧版本。我想我会试一试,看看它通向何方。
    • 谢谢sixfeetsix。我现在要这样做,让你知道它是怎么回事。我仍然希望能够使用新版本的 sqlite 而不必 - 我猜你称之为“静态链接它”。除了合并路线还有什么想法?
    • 嗯,它看起来有效。我在我的配置脚本中添加了--with-sqlite=/root/installs/sqlite-amalgamation-3070701/sqlite3.c 行,并且愉快地配置了颠覆并随后进行了安装。但是,我仍然无法从命令行访问较新的 sqlite 版本。我会再开一两天,看看是否有其他人对此有任何想法,或者我是否偶然发现了解决方案。如果不出意外,我会将您的答案标记为已接受的答案。再次感谢!