Created
May 31, 2023 03:52
-
-
Save sunfkny/8c491cb129913dd3a466fcc407e02a09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install -y wget tar gzip gcc make expect | |
# 下载源码 | |
wget --no-check-certificate https://www.sqlite.org/src/tarball/sqlite.tar.gz | |
# 编译 | |
tar xzf sqlite.tar.gz | |
cd sqlite | |
export CFLAGS="-DSQLITE_ENABLE_FTS3 \ | |
-DSQLITE_ENABLE_FTS3_PARENTHESIS \ | |
-DSQLITE_ENABLE_FTS4 \ | |
-DSQLITE_ENABLE_FTS5 \ | |
-DSQLITE_ENABLE_JSON1 \ | |
-DSQLITE_ENABLE_LOAD_EXTENSION \ | |
-DSQLITE_ENABLE_RTREE \ | |
-DSQLITE_ENABLE_STAT4 \ | |
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \ | |
-DSQLITE_SOUNDEX \ | |
-DSQLITE_TEMP_STORE=3 \ | |
-DSQLITE_USE_URI \ | |
-O2 \ | |
-fPIC" | |
export PREFIX="/usr/local" | |
#LIBS="-lm" ./configure --disable-tcl --enable-shared --enable-tempstore=always --prefix="$PREFIX" | |
LIBS="-lm" ./configure --enable-shared --enable-tempstore=always --prefix="$PREFIX" | |
make && make install | |
# 替换系统低版本 sqlite3 | |
mv /usr/bin/sqlite3 /usr/bin/sqlite3_old | |
ln -s /usr/local/bin/sqlite3 /usr/bin/sqlite3 | |
echo "/usr/local/lib" > /etc/ld.so.conf.d/sqlite3.conf | |
ldconfig | |
sqlite3 -version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment