CentOS6.5安装sqlite3[转]
1、下载安装包:https://www.sqlite.org/download.html
2、解压
[root@mycentos ~]# tar xzvf sqlite-snapshot-201809101443.tar.gz
3、编译安装
进入 sqlite-snaspshot-20180901443目录
[root@mycentos ~]# ./configure --prefix=/usr/local/sqlite3
[root@mycentos ~]# make
[root@mycentos ~]# make install
注意:安装完毕有这样一段提示

----------------------------------------------------------------------
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.
----------------------------------------------------------------------

这段内容显示了sqlite3的安装路径:/usr/local/sqlite3/lib。
特别注意 add LIBDIR to the 'LD_LIBRARY_PATH' environment variablesqlite 建议添加环境变量。
[root@mycentos ~]# vim /etc/profile
export LD_LIBRARY_PATH=/usr/local/sqlite3/lib
export LD_RUN_PATH=/usr/local/sqlite3/lib [root@mycentos ~]# source /etc/profile
4、修改python安装源码的setup.py如下:

[root@mycentos ~]# vim setup.py sqlite_inc_paths = [ '/usr/include',
'/usr/local/sqlite3/include', #增加该部分内容
'/usr/include/sqlite',
'/usr/include/sqlite3',
'/usr/local/include',
'/usr/local/include/sqlite',

重新编译安装Python3。
PS:如果运行python程序的时候会出现:ModuleNotFoundError: No module named '_sqlite3'
原因有可能是,你安装了多个python版本,而你使用的这个python版本没有_sqlite3.so这个文件。
[root@mycentos ~]# find / -name _sqlite3.so
/usr/lib64/python2.6/lib-dynload/_sqlite3.so
然后copy到你使用的python版本相应的目录下:
[root@mycentos ~]# cp /usr/lib64/python2.6/lib-dynload/_sqlite3.so /usr/local/python3/lib/python3.6/lib-dynload
问题解决!
CentOS6.5安装sqlite3[转]的更多相关文章
- CentOS6.5安装sqlite3
1.下载安装包:https://www.sqlite.org/download.html 2.解压 [root@mycentos ~]# tar xzvf sqlite-snapshot-201809 ...
- vmware Centos6.6安装64位
Centos6.6安装64位 必须开启BIOS中的虚拟化技术 首先开机进入BIOS,一般机器是按F2,我的T420是按F1,然后进入Security,Virtualization,选择Enable即可 ...
- Gitlab完美安装【CentOS6.5安装gitlab-6.9.2】
摘要: 拆腾了几天,终于在今天找到了快速安装Gitlab的方法.CentOS6.5安装gitlab-6.9.2 参考网址:https://gitlab.com/gitlab-org/omnibus-g ...
- CentOS6.5安装Tomcat
安装说明 安装环境:CentOS-6.4 安装方式:源码安装 软件:apache-tomcat-7.0.56.tar.gz 下载地址:http://tomcat.apache.org/download ...
- Centos6 yum安装openldap+phpldapadmin+TLS+双主配置
原文地址:http://54im.com/openldap/centos-6-yum-install-openldap-phpldapadmin-tls-%E5%8F%8C%E4%B8%BB%E9%8 ...
- centos6.5安装oracle11g_2
centos7安装oracle数据库不成功,换成centos6.5安装,可以安装成功,记录一下 安装系统时,主机名如果不是用localhost,安装成功后,要用主机名和ip做映射,修改/etc/hos ...
- CentOS6.6安装vmware workstation报错
本人系统用的是centos6.6,安装了vmware workstation,启动后一直如下图报错,相关内核已经安装了的,哪位前辈如果解决过这样的问题,麻烦指点指点,小弟在此先谢过了.
- CentOS6.6安装virtualbox4.1.44
本人用的是centos6.6,安装了virtualbox 4.1.44,启动后一直如上图报错,哪位前辈如果解决过这样的问题,麻烦指点指点,小弟在此先谢过了.
- [转]CentOS-6.3安装配置cmake
CentOS-6.3安装配置cmake zhoulf 2013-02-03 原创 安装说明 安装环境:CentOS-6.3安装方式:源码编译安装 软件:cmake-2.8.10.2.tar.gz下 ...
随机推荐
- Android 破解
一.反编译 默认你的电脑中完好的有java环境 1.下载 Android killer 链接: https://pan.baidu.com/s/1s6lfm8CbdU9ABYEOhdFWxA 提取码 ...
- Contiki Etimer 模块
一.Etimer概述 Etimer提供产生时间事件(timed event)的机制,当设定好的timer到期时,将会给设定etimer的process发送一个PROCESS_EVENT_TIMER 事 ...
- Luke 5—— 可视化 Lucene 索引查看工具,可以查看ES的索引
Luke 5 发布,可视化 Lucene 索引查看工具 oschina 发布于2015年08月31日 这是一个主要版本,该版本支持 Lucene 5.2.0. 它支持 elasticsearch ...
- Servlet_03_部署描述符
二.参考文档 1.Servlet 3.0 之 部署描述符 2.web.xml配置详解 部署描述符文件
- tf.stack和tf.unstack
import tensorflow as tf a = tf.constant([1,2,3]) b = tf.constant([4,5,6]) c1 = tf.stack([a,b],axis=0 ...
- About ListView
这一篇整理一些ListView的基本知识. PartA翻译自API Guide: (A)API Guide 使用Adapter建立(bind)Layout 当layout内容是动态的或者不是预先决定好 ...
- 四连测Day4
四连爆炸 卡我常数 好像被AluminumGod拉到了创客...哇我这个天天爆炸的水平可能会被其他三位dalao吊起来打 orz Edmond-Karp_XiongGod orz Deidara_Wa ...
- HihoCoder1641 : 热门号码([Offer收割]编程练习赛37)(模拟)
描述 1 2 3 ABC DEF 4 5 6 GHI JKL MNO 7 8 9 PQRS TUV WXYZ * 0 # 我们知道电话拨号盘上数字会有若干字母对应,例如2对应ABC,7对应PQRS. ...
- BZOJ_1818_[Cqoi2010]内部白点 _扫描线+树状数组
BZOJ_1818_[Cqoi2010]内部白点 _扫描线+树状数组 Description 无限大正方形网格里有n个黑色的顶点,所有其他顶点都是白色的(网格的顶点即坐标为整数的点,又称整点).每秒钟 ...
- 【Lintcode】074.First Bad Version
题目: The code base version is an integer start from 1 to n. One day, someone committed a bad version ...