Last active
June 13, 2024 15:19
-
-
Save janfri/a3e61731864a63554ba6f32bdc7179aa to your computer and use it in GitHub Desktop.
Install sqlite-pcre on OSX
This file contains hidden or 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
brew install sqlite pcre | |
git clone https://github.com/ralight/sqlite3-pcre.git | |
cd sqlite3-pcre | |
cc -shared -o pcre.so -I/usr/local/opt/pcre/include -fPIC -W -Werror pcre.c -L/usr/local/opt/pcre/lib -lpcre | |
echo ".load '`pwd`/pcre.so'" >> ~/.sqliterc |
Thanks for the hint to the typo.
On my system it works.
When using the cc command above, I received the error ld: symbol(s) not found for architecture x86_64
Some research indicated that I also needed -lsqlite3
The following command worked
cc -shared -o pcre.so -I/usr/local/opt/pcre/include -fPIC -W -Werror pcre.c -L/usr/local/opt/pcre/lib -lpcre -lsqlite3
on macOS 14 Sonoma you need to explicit the path for pcre
after brew install (or update):
cc -shared -o pcre.so -I/usr/local/opt/pcre/include -fPIC -W -Werror pcre.c -L/opt/homebrew/Cellar/pcre/8.45/ -lpcre -lsqlite3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typo in
intall
. Also even after this I get 'Error: no such function: REGEXP'