首页 > 数据库 >CnetOS 7.9 安装 sqlite3

CnetOS 7.9 安装 sqlite3

时间:2022-10-09 13:45:15浏览次数:93  
标签:bin sqlite CnetOS LIBDIR usr sqlite3 7.9 local

一、CnetOS 7.9 安装 sqlite3

地址

 

wget 下载

wget https://www.sqlite.org/2022/sqlite-autoconf-3390400.tar.gz

解压包

tar -zxvf sqlite-autoconf-3390400.tar.gz -C /opt/

进入文件包

cd /opt/sqlite-autoconf-3390400

检测安装路径

./configure --prefix=/usr/local/sqlite3

 

编译&安装

make && make install

安装完后可以看见如下提示

这段内容显示了sqlite3的安装路径:/usr/local/sqlite3/lib。

特别注意 add LIBDIR to the 'LD_LIBRARY_PATH' environment variable,这是sqlite建议添加环境变量。

----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/sqlite3/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.
----------------------------------------------------------------------

 

增加环境变量

vim /etc/profile
export LD_LIBRARY_PATH=/usr/local/sqlite3/lib
# 使配置文件生效
source /etc/profile

 

查看是否安装成功

ls -l /usr/local/sqlite3/lib/*sqlite*
ls -l /usr/local/sqlite3/include/*sqlite*

 

替换系统中旧的sqlite

# 把旧的sqlite3改个名字
mv /usr/bin/sqlite3  /usr/bin/sqlite3_old
# 设置软链接
ln -s /usr/local/sqlite3/bin/sqlite3   /usr/bin/sqlite3
echo "/usr/local/sqlite3/lib" > /etc/ld.so.conf.d/sqlite3.conf
ldconfig

 

检测版本

[root@ecs-65685 bin]# sqlite3
SQLite version 3.39.4 2022-09-29 15:55:41
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> 
sqlite> .quit

# 查看sqlite3版本
[root@ecs-65685 bin]# sqlite3 --version
3.39.4 2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309

 

标签:bin,sqlite,CnetOS,LIBDIR,usr,sqlite3,7.9,local
From: https://www.cnblogs.com/huaxiayuyi/p/16770739.html

相关文章

  • CentOS 7.9 安装 django-3.2.10
    一、CentOS7.9安装django-3.2.10地址https://www.djangoproject.comhttps://github.com/django/django二、安装django先得安装pythonpython3python3-Vpip3-......
  • 宝塔 Linux 面板 7.9.4 开心版 【优化面板】
    安装下载地址:https://www.928wang.cn/archives/204.html更新日志本次更新时间:9月11日【更新】面板优化【解密】上传、安全、日志等文件进行了解密!【优化】授权文件重新......
  • CentOS 7.9 安装 rocketmq-4.9.2
    一、CentOS7.9安装rocketmq-4.9.2地址:https://rocketmq.apache.orghttps://github.com/apache/rocketmqhttps://archive.apache.org/dist/rocketmq/4.9.2/rocketmq......
  • Centos 7.9 安装 maven-3.8.6
    一、Centos7.9安装maven-3.8.6地址https://maven.apache.org/index.htmlhttps://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz......
  • CentOS 7.9 安装 jdk-8u333
    一、CentOS7.9安装jdk8地址https://www.oracle.comhttps://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html 使用Xftp......
  • CentOS 7.9 安装 Python-3.9.5
    一、CentOS7.9安装Python-3.9.5地址https://www.python.orghttps://www.python.org/ftp/python/3.9.5查看当前python版本pythonpython-V可以看到执行python......
  • CentOS 7.9 安装 mongodb5.0.13
    一、CentOS7.9安装mongodb5.0.131 下载地址:https://www.mongodb.com/try/download/community2  2 安装前的准备 #操作系统内核版本uname-a#操作系统......
  • CentOS 7.9 安装 redis-6.2.0
    一、CentOS7.9安装redis-6.2.01 下载地址:https://download.redis.io/releases/redis-6.2.0.tar.gz  2安装gcc来进行编译Redis由C语言编写,所以需要系统中有......
  • CentOS 7.9 安装 Jenkins 2.361.2
    一、CentOS7.9安装Jenkins2.361.21 下载地址:https://www.jenkins.io/download2 简介Jenkins是一个Java开发的开源持续集成工具,广泛用于项目开发,具有自动化构建......
  • CentOS 7.9 安装 nginx-1.22.0
    一、CentOS7.9安装nginx-1.22.0下载地址:http://nginx.org/en/download.html2 安装前的准备 #操作系统内核版本uname-a#操作系统发行版本cat/etc/redhat......