Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while installing #29

Open
tomerf8 opened this issue Nov 29, 2016 · 2 comments
Open

Error while installing #29

tomerf8 opened this issue Nov 29, 2016 · 2 comments

Comments

@tomerf8
Copy link

tomerf8 commented Nov 29, 2016

I'm having the same error while trying to install through pip or from sources:

OSX Sierra.
Python 2.7.12
openssl-1.0.2j installed via brew

clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -DMODULE_NAME="pysqlcipher.dbapi2" -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_LOAD_EXTENSION=1 -DSQLITE_HAS_CODEC=1 -DSQLITE_TEMP_STORE=2 -DHAVE_USLEEP=1 -Iamalgamation -I/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c amalgamation/sqlite3.c -o build/temp.macosx-10.12-x86_64-2.7/amalgamation/sqlite3.o amalgamation/sqlite3.c:18280:10: fatal error: 'openssl/rand.h' file not found #include <openssl/rand.h> ^ 1 error generated. error: command 'clang' failed with exit status 1

@tomerf8
Copy link
Author

tomerf8 commented Dec 5, 2016

After some research I was able to installed it successfully. The problem was linking the brew'd openssl headers. (brew-refusing-to-link-openssl)

Anyway:

  1. install brew
  2. brew install openssl
  3. Install via pip with: LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig pip install pysqlcipher --install-option="--bundled"

@kalikaneko
Copy link
Member

Hi @tomerf8
glad you found the fix,
maybe it'd be good to add this in a section of the README, or even adding the extra flags to the setup.py, since I guess brew will be a common way of installing openssl under osx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants