Tuesday, January 24, 2023

Install Fastdb in CentOS

环境: CentOS 6.4 32位

注意:

64位运行有问题,运行最后会报 segmentation fault,所以最后采用32位操作系统。

1.1 安装
(1) 安装需要的依赖

yum install gcc make gcc-c++ wget
(2) 下载源码

wget http://www.garret.ru/fastdb-3.76.tar.gz
(3) 解压

tar -xvf fastdb-3.76.tar.gz
(4) 切换到目录

cd fastdb
(5) 配置安装目录 /opt/fastdb

./configure --prefix=/opt/fastdb
(6) 编译

make -j16
(7) 安装

make install
(8) 注意事项

Linux下运行程序提示:

Incompatibility between headers and library

fastdb会假设绝大多数的Linux版是64-bit,如果你的机子是32-bit的,必须将config.h文件的如下内容注释掉:

// #if !defined(_WIN32) || defined(_WIN64) // most unixes are now 64-bit, while 32-bit windows is still quite popular
 
// #define LARGE_DATABASE_SUPPORT
 
//

No comments: