>You are probably running the sqlite3 command but using the stock
>sqlite3 lib that ships with ubuntu. You would need to place the
>location of the libraries into LD_LIBRARY_PATH so they can be located
>by the sqlite shell. Try running this before you run sqlite3
>$ export
>LD_LIBRARY_PATH=/path_my_user/desktop/crypto/usr/local/lib:>$LD_LIBRARY_PATH
>Cheers,
>Stephen
Hi Stephen.
Thank you very much for answering!.
I managed to configure and compile and create an encrypted database.
Now, I'm trying to access it through Python, using the following code:
CODE PYTHON:--------------------------------------------------------
#!/usr/bin/python
# -*- encoding:utf-8 -*-
import sqlite3
conn=sqlite3.connect('bdata.db')
c = conn.cursor()
c.execute("PRAGMA key='123'")
c.execute('select * from data')
for row in c:
print row[0], row[1]
c.close()
---------------------------------------------------------
If the database is not encrypted, I can read the data, but if it is, no
You can connect using Python?
NOTE:*****************************************************************
I tried to compile statically SQLCipher, with the following statement
from the website:
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC"
LDFLAGS="/usr/lib/libcrypto.a"
But it throws me the following error:
*** Warning: Linking the shared library libsqlite3.la against the
*** static library /usr/lib/libcrypto.a is not portable!
....
....
.... bla,bla...
./.libs/libsqlite3.so: undefined reference to `dlsym'
./.libs/libsqlite3.so: undefined reference to `dlerror'
./.libs/libsqlite3.so: undefined reference to `dlopen'
./.libs/libsqlite3.so: undefined reference to `dlclose'
collect2: ld returned 1 exit status
make: *** [sqlite3] Error 1
why?.
************************************************************************
thank you in advance.
Best Regards.
Cris.
>The same trick should work for python. Just set LD_LIBRARY_PATH before
>executing your python program and it will cause the python sqlite
>bindings to use the sqlcipher-enabled library. Here is some more
>information.
>http://groups.google.com/group/sqlcipher/browse_thread/thread/3928aecc7937f272?pli=1
>Cheers,
>Stephen
Hi. Stephen.
Thank you very much for the information!. Now works properly.
Cuestion:-
Is it possible to compile statically SQLCipher in Ubuntu? or create
binary SQLCipher in Ubuntu?.
I've tried:
COMMAND 1 :====================================================
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC"
LDFLAGS="-lcrypto"
ERROR WHEN RUNNING MAKE:
*** Warning: Linking the shared library libsqlite3.la against the
*** static library /usr/lib/libcrypto.a is not portable!
....
....
.... bla,bla...
./.libs/libsqlite3.so: undefined reference to `dlsym'
./.libs/libsqlite3.so: undefined reference to `dlerror'
./.libs/libsqlite3.so: undefined reference to `dlopen'
./.libs/libsqlite3.so: undefined reference to `dlclose'
collect2: ld returned 1 exit status
make: *** [sqlite3] Error 1
COMMAND 2 :=============================================================
./configure --prefix=/home/cris/desktop/sqlcipher-binaries --disable-tcl
--enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-l crypto"
ERROR WHEN RUNNING MAKE:
....
....
libtool: link: gcc -shared .libs/sqlite3.o -l -lpthread
-Wl,-soname -Wl,libsqlite3.so.0 -o .libs/libsqlite3.so.0.8.6
/usr/bin/ld: cannot find -l-lpthread
collect2: ld returned 1 exit status
make: *** [libsqlite3.la] Error 1
SEARCH lpthread :
cris:~ locate libpthread
/lib/libpthread.so.0
/lib/tls/i686/cmov/libpthread.so.0
/usr/lib/libpthread.a
How I can give the path in the configuration?
Best Regards.
Cris
On 13 Mar 2015, at 7:21, AmirHossein NickAein wrote:
hi
i have a problem in configuring:
in dynamic linking, i receive this error:
checking whether the C compiler works... no
in static linking, this error:
configure: error: Library crypto not found. Install openssl!"
for static method, i built last version of opensslwhat's wrong?
The error message is showing you that you are missing the OpenSSL dependency on your machine. On Ubuntu you need to install the following:
apt-get install libssl-dev
Nick Parker