centos8stream 升级 sqlite3 ,解决 SQLite 3.27 or later is required (found 3.26.0).

服务器环境是centos8stream, 默认的sqlite是 3.26 ,因此,需要升级。

sqlite官网:SQLite Download Page

1.从官网下载最新源码包

复制代码
cd /opt/
wget https://www.sqlite.org/2023/sqlite-autoconf-3440200.tar.gz
tar xvf sqlite-autoconf-3440200.tar.gz
cd sqlite-autoconf-3440200/

2.编译安装

复制代码
./configure
make -j 4
make install

安装日志如下

bash 复制代码
make[1]: Entering directory '/opt/sqlite-autoconf-3440200'
 /usr/bin/mkdir -p '/usr/local/lib'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libsqlite3.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libsqlite3.so.0.8.6 /usr/local/lib/libsqlite3.so.0.8.6
libtool: install: (cd /usr/local/lib && { ln -s -f libsqlite3.so.0.8.6 libsqlite3.so.0 || { rm -f libsqlite3.so.0 && ln -s libsqlite3.so.0.8.6 libsqlite3.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libsqlite3.so.0.8.6 libsqlite3.so || { rm -f libsqlite3.so && ln -s libsqlite3.so.0.8.6 libsqlite3.so; }; })
libtool: install: /usr/bin/install -c .libs/libsqlite3.lai /usr/local/lib/libsqlite3.la
libtool: install: /usr/bin/install -c .libs/libsqlite3.a /usr/local/lib/libsqlite3.a
libtool: install: chmod 644 /usr/local/lib/libsqlite3.a
libtool: install: ranlib /usr/local/lib/libsqlite3.a
libtool: finish: PATH="/data/devworker/py311/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/.dotnet/tools:/root/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/usr/local/bin'
  /bin/sh ./libtool   --mode=install /usr/bin/install -c sqlite3 '/usr/local/bin'
libtool: install: /usr/bin/install -c sqlite3 /usr/local/bin/sqlite3
 /usr/bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 sqlite3.h sqlite3ext.h '/usr/local/include'
 /usr/bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 sqlite3.1 '/usr/local/share/man/man1'
 /usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 sqlite3.pc '/usr/local/lib/pkgconfig'
make[1]: Leaving directory '/opt/sqlite-autoconf-3440200'

3.添加类库路径,并加载

bash 复制代码
vim /etc/ld.so.conf.d/sqlite.conf

# 内容如下
/usr/local/lib

内容填写上面lib库的位置:/usr/local/lib

bash 复制代码
ldconfig
ldconfig  -p|grep sqlite

这个就是最新的sqlite3的lib库问题

可以看到已经完成升级安装

相关推荐
快来卷java2 小时前
MySQL篇(六)MySQL 分库分表:应对数据增长挑战的有效策略
数据库·mysql·oracle
IT认证通关4 小时前
金仓数据库KCM认证考试介绍【2025年4月更新】
数据库
程序猿阿伟4 小时前
《SQL赋能人工智能:解锁特征工程的隐秘力量》
数据库·人工智能·sql
冰箱里的金鱼5 小时前
MYSQL 存储引擎 和 日志
数据库
Yan-英杰5 小时前
【百日精通JAVA | SQL篇 | 第三篇】 MYSQL增删改查
java·数据库·sql
信徒_5 小时前
Mysql 中的 binlog、redolog、undolog
数据库·mysql
极限实验室6 小时前
代理 Elasticsearch 服务:INFINI Gateway VS Nginx
数据库·搜索引擎
三月七(爱看动漫的程序员)6 小时前
LLM面试题六
数据库·人工智能·gpt·语言模型·自然语言处理·llama·milvus
追光天使7 小时前
Mac 上使用 mysql -u root -p 命令,出现“zsh: command not found: mysql“?
数据库·mysql·macos
高铭杰7 小时前
Citus源码(2)分布式读流程分析与基础概念梳理(shardid、placementid、groupid)
数据库·分布式·postgresql·citus