使用brew在Mac上安装sqlite3
brew install sqlite3
可能您已经安装了sqlite3,因为默认情况下它是从Mac OSX 10.4开始安装的。在这种情况下,可以通过运行以下命令使用brew更新sqlite3:
brew upgrade sqlite3
检查安装版本
sqlite3 --version
$ brew info sqlite3
sqlite: stable 3.35.3 (bottled) [keg-only]
Command-line interface for SQLite
https://sqlite.org/
/usr/local/Cellar/sqlite/3.34.0 (11 files, 4.1MB)
Poured from bottle on 2020-12-08 at 14:14:48
/usr/local/Cellar/sqlite/3.35.3 (11 files, 4.2MB)
Poured from bottle on 2021-05-08 at 16:13:18
From: https://mirrors.ustc.edu.cn/homebrew-core.git/Formula/sqlite.rb
License: blessing
==> Dependencies
Required: readline ✔
==> Caveats
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have sqlite first in your PATH, run:
echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.zshrc
For compilers to find sqlite you may need to set:
export LDFLAGS="-L/usr/local/opt/sqlite/lib"
export CPPFLAGS="-I/usr/local/opt/sqlite/include"
For pkg-config to find sqlite you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"
==> Analytics
install: 773,038 (30 days), 2,124,445 (90 days), 6,622,149 (365 days)
install-on-request: 39,746 (30 days), 146,640 (90 days), 528,896 (365 days)
build-error: 0 (30 days)