Closed trevdan88 closed 2 years ago
Hi @trevdan88, unfortunately I don't have a Windows machine so I don't have any idea... but it doesn't look simple. FYI it's SQLCipher
that is difficult to install, pysqlcipher
(the Python wrapper) is in theory straight-forward.
Two options:
1) You could try running: pip install pysqlcipher --install-option="--bundled"
. There's a chance this will do what is needed. source
2) Install WSL (Windows Subsystem for Linux) and try the Linux instructions.
Please let me know if you try either of these and what the outcome is! I'd like to be able to add Windows instructions to the README.
Thanks @carderne
no luck, see the errors below:
WARNING: Discarding https://files.pythonhosted.org/packages/58/5c/de62fc9a5f61db6d23907caa280b23323c66009b73f439d1cc5b9fcc3983/pysqlcipher-2.6.3.tar.gz#sha256=409b2730ddda40feb500c67850bd61b53794584ea9b636c42800aad0c32c92bd (from https://pypi.org/simple/pysqlcipher/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement pysqlcipher ERROR: No matching distribution found for pysqlcipher
C:>
I also tried the steps under - which I "THINK" (hopefully) installed pysqlcipher: https://stackoverflow.com/questions/55446420/issue-in-installing-pysqlcipher3
And when I execute sigexport.py I get the below error:
(base) PS C:\Users\
What OS do you use? WSL also gave me the same error during PySQLCipher installation.
I use Linux (Ubuntu).
I’ve never used WSL but in theory (I think) you should be able to follow the Ubuntu install instructions on WSL… Sorry it’s not working, thanks for reporting back.
Thanks @carderne my issue with Ubuntu was that signal desktop was not opening. Are you on 20.04 LTS.
I was able to install the same on Ubuntu.
However when I run the Python script sigexport.py it gives me the following errors:
file is encrypted or is not a database
I tried the script with the --manual option as mentioned in the readme as the solution
However I get the error when using --manual:
no such table: conversations
Please advise.
On reading online it says you get the message pysqlcipher3.dbapi2.DatabaseError: file is not a database
occurs when the database version doesn't match the SQLite version on the system, is this correct?
How do we get around this?
I have a documentation on how to get things working till here, I can share this with you so that the documentation can be updated.
Just so I understand, are you talking about Ubuntu or Ubuntu on WSL? I'm assuming the latter. If so please share what you've learned.
About the problem, did you follow the full installation instructions from the README? (I have no idea if anything needs to be done differently under WSL.)
Then to get sqlcipher working:
sudo apt install libsqlcipher-dev libssl-dev
Then clone sqlcipher and install it:
git clone https://github.com/sqlcipher/sqlcipher.git
cd sqlcipher
mkdir build && cd build
../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
sudo make install
I installed all the pre-requisites (though I should point out that I never used any of them before so I had to install python, pip, pipx, virtualenv, accidentally update to windows 11 for WSL2, and unbuntu. Did my best to get them all working properly but I'm really not familiar with how these work and something might have slipped in the last step) and it seemed to have been running fine up until installing sqlcipher (I tried it a second time after running the code to clone sqlcipher but to no avail):
Other errors I got were "no acceptable C compiler found in $PATH" and ".sigexport.py: No such file or directory" that I tried to fix it using --source
and --s
but it said that the command was not found (same with sudo make):
Also, I'm not quite sure if I'm using the right path for --source
? Is it supposed to be this instead?
"C:\Users\
Hi @Harkens, well done for giving it a go! I'm afraid I can't help much with Windows/WSL.
It seems like you couldn't compile sqlcipher
because you don't have gcc
installed, and there seems to also be an issue with running make
.
So:
sudo apt install build-essential gcc
cd ~/sqlcipher/build
../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
sudo make install
And if everything went well, you can try to run sigexport. Firstly, did you already do the first steps of the install instructions?
cd ~
git clone https://github.com/carderne/signal-export.git
cd signal-export
pip install -r requirements.txt
If not do them now!
And theeeen you can try running it e.g.
./sigexport test_output
(You may need to add --manual
and --source C:\Users\...
depending on whether it works.)
@carderne Thank you so much for the quick response!
gcc
seems to have been installed smoothly unless these lines are significant:
I did encounter another problem with ../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
. This time C compiler could not create executables.
Sorry, I have no idea, you might need to look into config.log
and do some Googling.
Two possible solutions that came on a search that you could try (just a bunch of extra stuff to sudo apt install
):
(Heads up: this is pretty long because I included the output from config.log and ../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
)
Double-checked that gcc was installed properly:
which gcc
produced /usr/bin/gcc
gcc --version
produced:
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Then used cd ~/sqlcipher/build
and cat config.log
to check config.log
.
Main things I've noticed (full output listed below):
configure:2836: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2836: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:2867: checking whether the C compiler works
configure:2889: gcc -DSQLITE_HAS_CODEC -lcrypto conftest.c >&5
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
configure:2893: $? = 1
configure:2931: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "sqlcipher"
| #define PACKAGE_TARNAME "sqlcipher"
| #define PACKAGE_VERSION "3.34.1"
| #define PACKAGE_STRING "sqlcipher 3.34.1"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2936: error: in `/root/sqlcipher/build':
configure:2938: error: C compiler cannot create executables
See `config.log' for more details
I'm guessing I'm missing whatever is needed for -lcrypto
.
https://stackoverflow.com/questions/62002713/cannot-find-lcrypto
https://github.com/znort987/blockparser/issues/38
https://askubuntu.com/questions/396940/found-solutions-to-cannot-find-lcrypto-are-not-working-for-me
So I ran sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
libssl-doc
The following NEW packages will be installed:
libssl-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1582 kB of archives.
After this operation, 8005 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libssl-dev amd64 1.1.1f-1ubuntu2 [1582 kB]
Fetched 1582 kB in 2s (655 kB/s)
Selecting previously unselected package libssl-dev:amd64.
(Reading database ... 37458 files and directories currently installed.)
Preparing to unpack .../libssl-dev_1.1.1f-1ubuntu2_amd64.deb ...
Unpacking libssl-dev:amd64 (1.1.1f-1ubuntu2) ...
Setting up libssl-dev:amd64 (1.1.1f-1ubuntu2) ...
And tried using cd ~/sqlcipher/build
and ../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
again and these are the things I noticed (full output at the bottom):
checking whether the C compiler works... yes
checking for tclsh8.7... no
checking for tclsh8.6... no
checking for tclsh8.5... no
checking for tclsh... no
Warning: can't find tclsh - defaulting to non-amalgamation build.
../configure: line 8492: tclsh: command not found
configure: Version set to 3.34
configure: Release set to 3.34.1
checking whether to support threadsafe operation... yes
checking for library containing pthread_create... -lpthread
checking for library containing pthread_mutexattr_init... none required
checking for crypto library to use... openssl
checking for HMAC_Init_ex in -lcrypto... yes
checking whether to allow connections to be shared across threads... no
checking whether to support shared library linked as release mode or not... no
checking whether to use an in-ram database for temporary tables... yes
checking if executables have the .exe suffix... unknown
checking for Tcl configuration... ../configure: line 9071: tclsh: command not found
../configure: line 9085: tclsh: command not found
configure: WARNING: Can't find Tcl configuration definitions
configure: WARNING: *** Without Tcl the regression tests cannot be executed ***
configure: WARNING: *** Consider using --with-tcl=... to define location of Tcl ***
checking for library containing readline... no
checking for library containing tgetent... no
checking for readline in -lreadline... no
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking for /usr/include/readline.h... no
checking for /usr/include/readline/readline.h... no
checking for /usr/local/include/readline.h... no
checking for /usr/local/include/readline/readline.h... no
checking for /usr/local/readline/include/readline.h... no
checking for /usr/local/readline/include/readline/readline.h... no
checking for /usr/contrib/include/readline.h... no
checking for /usr/contrib/include/readline/readline.h... no
checking for /mingw/include/readline.h... no
checking for /mingw/include/readline/readline.h... no
checking for library containing fdatasync... none required
checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
checking for library containing deflate... no
checking for library containing dlopen... -ldl
checking whether to support MEMSYS5... no
checking whether to support MEMSYS3... no
Would it safe to proceed with sudo make install
?
Full Output cat config.log
:
## --------- ##
## Platform. ##
## --------- ##
hostname = <USER>
uname -m = x86_64
uname -r = 5.4.72-microsoft-standard-WSL2
uname -s = Linux
uname -v = #1 SMP Wed Oct 28 23:40:43 UTC 2020
root@<USER>:~/sqlcipher/build#
/usr/bin/uname -p = x86_64
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /usr/lib/wsl/lib
PATH: /mnt/c/Windows/system32
PATH: /mnt/c/Windows
PATH: /mnt/c/Windows/System32/Wbem
PATH: /mnt/c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /mnt/c/Windows/System32/OpenSSH/
PATH: /mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common
PATH: /mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR
PATH: /mnt/c/Program Files/nodejs/
PATH: /mnt/c/ProgramData/chocolatey/bin
PATH: /mnt/c/WINDOWS/system32
PATH: /mnt/c/WINDOWS
PATH: /mnt/c/WINDOWS/System32/Wbem
PATH: /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/
PATH: /mnt/c/WINDOWS/System32/OpenSSH/
PATH: /mnt/c/Users/<USER>/AppData/Local/Programs/Python/Python39
PATH: /mnt/c/Users/<USER>/AppData/Local/Programs/Python/Python39/Scripts
PATH: /mnt/c/Users/<USER>/AppData/Roaming/Python/Python39/Scripts
PATH: /mnt/c/Users/<USER>/AppData/Local/Microsoft/WindowsApps
PATH: /mnt/c/Users/<USER>/spicetify-cli
PATH: /mnt/c/Users/<USER>/AppData/Roaming/npm
PATH: /mnt/c/Users/<USER>/AppData/Local/Microsoft/WindowsApps
PATH: /mnt/c/Users/<USER>/AppData/Local/Pandoc/
PATH: /mnt/c/Users/<USER>/.local/bin
PATH: /snap/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2387: checking build system type
configure:2401: result: x86_64-pc-linux-gnu
configure:2421: checking host system type
configure:2434: result: x86_64-pc-linux-gnu
configure:2475: checking how to print strings
configure:2502: result: printf
configure:2571: checking for gcc
configure:2587: found /usr/bin/gcc
configure:2598: result: gcc
configure:2827: checking for C compiler version
configure:2836: gcc --version >&5
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2847: $? = 0
configure:2836: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-10ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
configure:2847: $? = 0
configure:2836: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2847: $? = 1
configure:2836: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:2847: $? = 1
configure:2867: checking whether the C compiler works
configure:2889: gcc -DSQLITE_HAS_CODEC -lcrypto conftest.c >&5
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
configure:2893: $? = 1
configure:2931: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "sqlcipher"
| #define PACKAGE_TARNAME "sqlcipher"
| #define PACKAGE_VERSION "3.34.1"
| #define PACKAGE_STRING "sqlcipher 3.34.1"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2936: error: in `/root/sqlcipher/build':
configure:2938: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-DSQLITE_HAS_CODEC
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=-lcrypto
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_TCLLIBDIR_set=
ac_cv_env_TCLLIBDIR_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-pc-linux-gnu
ac_cv_prog_ac_ct_CC=gcc
## ----------------- ##
## Output variables. ##
## ----------------- ##
ALLOWRELEASE=''
AR=''
AWK=''
BUILD_CC=''
BUILD_CFLAGS=''
BUILD_EXEEXT=''
CC='gcc'
CFLAGS='-DSQLITE_HAS_CODEC'
CPP=''
CPPFLAGS=''
DEFS=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GREP=''
HAVE_TCL=''
HAVE_ZLIB=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LD=''
LDFLAGS='-lcrypto'
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MANIFEST_TOOL=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OPT_FEATURE_FLAGS=''
OTOOL64=''
OTOOL=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='sqlcipher'
PACKAGE_STRING='sqlcipher 3.34.1'
PACKAGE_TARNAME='sqlcipher'
PACKAGE_URL=''
PACKAGE_VERSION='3.34.1'
PATH_SEPARATOR=':'
RANLIB=''
RELEASE=''
SED=''
SHELL='/bin/bash'
SQLITE_OS_UNIX=''
SQLITE_OS_WIN=''
SQLITE_THREADSAFE=''
STRIP=''
TARGET_DEBUG=''
TARGET_EXEEXT=''
TARGET_HAVE_EDITLINE=''
TARGET_HAVE_READLINE=''
TARGET_READLINE_INC=''
TARGET_READLINE_LIBS=''
TCLLIBDIR=''
TCLSH_CMD=''
TCL_BIN_DIR=''
TCL_INCLUDE_SPEC=''
TCL_LIB_FILE=''
TCL_LIB_FLAG=''
TCL_LIB_SPEC=''
TCL_SHLIB_SUFFIX=''
TCL_SRC_DIR=''
TCL_STUB_LIB_FILE=''
TCL_STUB_LIB_FLAG=''
TCL_STUB_LIB_SPEC=''
TCL_VERSION=''
TEMP_STORE=''
USE_AMALGAMATION=''
USE_GCOV=''
VERSION=''
XTHREADCONNECT=''
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
bindir='${exec_prefix}/bin'
build='x86_64-pc-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-pc-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "sqlcipher"
#define PACKAGE_TARNAME "sqlcipher"
#define PACKAGE_VERSION "3.34.1"
#define PACKAGE_STRING "sqlcipher 3.34.1"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
configure: exit 77
Full Output ../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
:
root@<USER>:~/sqlcipher/build# ../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for intptr_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uintptr_t... yes
checking for sys/types.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for fdatasync... yes
checking for gmtime_r... yes
checking for isnan... yes
checking for localtime_r... yes
checking for localtime_s... no
checking for malloc_usable_size... yes
checking for strchrnul... yes
checking for usleep... yes
checking for utime... yes
checking for pread... yes
checking for pread64... yes
checking for pwrite... yes
checking for pwrite64... yes
checking for tclsh8.7... no
checking for tclsh8.6... no
checking for tclsh8.5... no
checking for tclsh... no
Warning: can't find tclsh - defaulting to non-amalgamation build.
../configure: line 8492: tclsh: command not found
configure: Version set to 3.34
configure: Release set to 3.34.1
checking whether to support threadsafe operation... yes
checking for library containing pthread_create... -lpthread
checking for library containing pthread_mutexattr_init... none required
checking for crypto library to use... openssl
checking for HMAC_Init_ex in -lcrypto... yes
checking whether to allow connections to be shared across threads... no
checking whether to support shared library linked as release mode or not... no
checking whether to use an in-ram database for temporary tables... yes
checking if executables have the .exe suffix... unknown
checking for Tcl configuration... ../configure: line 9071: tclsh: command not found
../configure: line 9085: tclsh: command not found
configure: WARNING: Can't find Tcl configuration definitions
configure: WARNING: *** Without Tcl the regression tests cannot be executed ***
configure: WARNING: *** Consider using --with-tcl=... to define location of Tcl ***
checking for library containing readline... no
checking for library containing tgetent... no
checking for readline in -lreadline... no
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking for /usr/include/readline.h... no
checking for /usr/include/readline/readline.h... no
checking for /usr/local/include/readline.h... no
checking for /usr/local/include/readline/readline.h... no
checking for /usr/local/readline/include/readline.h... no
checking for /usr/local/readline/include/readline/readline.h... no
checking for /usr/contrib/include/readline.h... no
checking for /usr/contrib/include/readline/readline.h... no
checking for /mingw/include/readline.h... no
checking for /mingw/include/readline/readline.h... no
checking for library containing fdatasync... none required
checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
checking for library containing deflate... no
checking for library containing dlopen... -ldl
checking whether to support MEMSYS5... no
checking whether to support MEMSYS3... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlcipher.pc
config.status: creating config.h
config.status: executing libtool commands
Would it safe to proceed with sudo make install?
:shrug: I guess so, give it a shot!
Ran sudo make install
and:
tclsh /root/sqlcipher/build/../tool/mkshellc.tcl >shell.c
/bin/sh: 1: tclsh: not found
make: *** [Makefile:1138: shell.c] Error 127
Seemed like tcl needed to be installed https://stackoverflow.com/questions/43317238/the-program-tclsh-is-currently-not-installed https://www.devmanuals.net/install/ubuntu/ubuntu-12-04-lts-precise-pangolin/install-tcl.html
Checked proper installation of tcl with which tclsh8.4
and still nothing, turns out I was asking for the wrong version and which tclsh8.6
gave me /usr/bin/tclsh8.6
.
Ran ../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
again and there are some changes but it Can't find Tcl configuration definitions
checking for tclsh8.7... no
checking for tclsh8.6... tclsh8.6
configure: Version set to 3.34
configure: Release set to 3.34.1
checking whether to support threadsafe operation... yes
checking for library containing pthread_create... -lpthread
checking for library containing pthread_mutexattr_init... none required
checking for crypto library to use... openssl
checking for HMAC_Init_ex in -lcrypto... yes
checking whether to allow connections to be shared across threads... no
checking whether to support shared library linked as release mode or not... no
checking whether to use an in-ram database for temporary tables... yes
checking if executables have the .exe suffix... unknown
checking for Tcl configuration... configure: WARNING: Can't find Tcl configuration definitions
configure: WARNING: *** Without Tcl the regression tests cannot be executed ***
configure: WARNING: *** Consider using --with-tcl=... to define location of Tcl ***
checking for library containing readline... no
checking for library containing tgetent... no
checking for readline in -lreadline... no
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking for /usr/include/readline.h... no
checking for /usr/include/readline/readline.h... no
checking for /usr/local/include/readline.h... no
checking for /usr/local/include/readline/readline.h... no
checking for /usr/local/readline/include/readline.h... no
checking for /usr/local/readline/include/readline/readline.h... no
checking for /usr/contrib/include/readline.h... no
checking for /usr/contrib/include/readline/readline.h... no
checking for /mingw/include/readline.h... no
checking for /mingw/include/readline/readline.h... no
checking for library containing fdatasync... none required
checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
checking for library containing deflate... no
checking for library containing dlopen... -ldl
checking whether to support MEMSYS5... no
checking whether to support MEMSYS3... no
Googling it suggested to run this command: sudo apt-get install tcl-dev tk-dev mesa-common-dev libjpeg-dev libtogl-dev
https://www.linuxquestions.org/questions/linux-software-2/configuration-error-can't-find-tcl-configuration-definition-4175434069/
Ran ../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
again and no errors.
checking for Tcl configuration... found /usr/lib/tclConfig.sh
checking for existence of /usr/lib/tclConfig.sh... loading
checking for library containing readline... no
Ran sudo make install
and found this at the end (the rest was just completely incomprehensible to me):
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [Makefile:678: sqlcipher] Error 1
Thought it might be worth a shot to try sudo apt install libsqlcipher-dev libssl-dev
this time.
The following additional packages will be installed:
libsqlcipher0 libssl1.1
Suggested packages:
sqlite3-doc libssl-doc
The following NEW packages will be installed:
libsqlcipher-dev libsqlcipher0
The following packages will be upgraded:
libssl-dev libssl1.1
2 upgraded, 2 newly installed, 0 to remove and 242 not upgraded.
Tried sudo make install
again and still the same error. Found these sites but I'm not meddling with that kind of code so I am once again quite lost about how to apply this.
https://stackoverflow.com/questions/7965437/undefined-reference-to-main-collect2-ld-returned-1-exit-status/33723769
https://stackoverflow.com/questions/15905119/c-linking-error-undefined-reference-to-main
https://www.includehelp.com/c-programs/id-returned-1-exit-status-undefined-reference-to-main-error-in-c.aspx
Full output sudo make install
(attempt 3):
./libtool --mode=link gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 -I. -I/root/sqlcipher/build/../src -I/root/sqlcipher/build/../ext/rtree -I/root/sqlcipher/build/../ext/icu -I/root/sqlcipher/build/../ext/fts3 -I/root/sqlcipher/build/../ext/async -I/root/sqlcipher/build/../ext/session -I/root/sqlcipher/build/../ext/userauth -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -I/usr/include/tcl8.6 -DSQLITE_THREADSAFE=1 -DSQLITE_HAVE_ZLIB=1 -lcrypto -DHAVE_READLINE=0 -DHAVE_EDITLINE=0 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_DESERIALIZE -o sqlcipher \
shell.c sqlite3.c \
-ldl -lz -lcrypto -lpthread -rpath "/usr/local/lib"
libtool: link: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 -I. -I/root/sqlcipher/build/../src -I/root/sqlcipher/build/../ext/rtree -I/root/sqlcipher/build/../ext/icu -I/root/sqlcipher/build/../ext/fts3 -I/root/sqlcipher/build/../ext/async -I/root/sqlcipher/build/../ext/session -I/root/sqlcipher/build/../ext/userauth -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -I/usr/include/tcl8.6 -DSQLITE_THREADSAFE=1 -DSQLITE_HAVE_ZLIB=1 -DHAVE_READLINE=0 -DHAVE_EDITLINE=0 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_DESERIALIZE -o sqlcipher shell.c sqlite3.c -ldl -lz -lcrypto -lpthread -Wl,-rpath -Wl,/usr/local/lib
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [Makefile:678: sqlcipher] Error 1
@Harkens, try: pip3 install pysqlcipher3
.
@PiWakeTV Thanks for the suggestion, however there still seem to be problems with running "make". Double-checked to see if I was missing anything by running everything else that was suggested on this thread but still nothing to solve the error :(
Ran pip3 install pysqlcipher3
Command 'pip3' not found, but can be installed with:
apt install python3-pip
Ran apt install python3-pip
then pip3 install pysqlcipher3
python3-pip is already the newest version (20.0.2-5ubuntu1.6).
0 upgraded, 0 newly installed, 0 to remove and 237 not upgraded.
Successfully built pysqlcipher3
Installing collected packages: pysqlcipher3
Successfully installed pysqlcipher3-1.0.4
Ran sudo make install
and the output gave the same error.
root@<USER>:~/sqlcipher/build# sudo make install
./libtool --mode=link gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 -I. -I/root/sqlcipher/build/../src -I/root/sqlcipher/build/../ext/rtree -I/root/sqlcipher/build/../ext/icu -I/root/sqlcipher/build/../ext/fts3 -I/root/sqlcipher/build/../ext/async -I/root/sqlcipher/build/../ext/session -I/root/sqlcipher/build/../ext/userauth -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -I/usr/include/tcl8.6 -DSQLITE_THREADSAFE=1 -DSQLITE_HAVE_ZLIB=1 -lcrypto -DHAVE_READLINE=0 -DHAVE_EDITLINE=0 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_DESERIALIZE -o sqlcipher \
shell.c sqlite3.c \
-ldl -lz -lcrypto -lpthread -rpath "/usr/local/lib"
libtool: link: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 -I. -I/root/sqlcipher/build/../src -I/root/sqlcipher/build/../ext/rtree -I/root/sqlcipher/build/../ext/icu -I/root/sqlcipher/build/../ext/fts3 -I/root/sqlcipher/build/../ext/async -I/root/sqlcipher/build/../ext/session -I/root/sqlcipher/build/../ext/userauth -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -I/usr/include/tcl8.6 -DSQLITE_THREADSAFE=1 -DSQLITE_HAVE_ZLIB=1 -DHAVE_READLINE=0 -DHAVE_EDITLINE=0 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_DESERIALIZE -o sqlcipher shell.c sqlite3.c -ldl -lz -lcrypto -lpthread -Wl,-rpath -Wl,/usr/local/lib
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [Makefile:678: sqlcipher] Error 1
Tried running sudo apt install libsqlcipher-dev libssl-dev
root@<USER>:~/sqlcipher/build# sudo apt install libsqlcipher-dev libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libsqlcipher-dev is already the newest version (3.4.1-1build2).
libssl-dev is already the newest version (1.1.1f-1ubuntu2.4).
0 upgraded, 0 newly installed, 0 to remove and 237 not upgraded.
and the following to see if it would help
git clone https://github.com/sqlcipher/sqlcipher.git
cd sqlcipher
mkdir build && cd build
../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
sudo make install
Output: (I think that cloning sqlcipher failed because I already cloned it before, since I get fatal errors about it already existing and not being an empty directory)
root@<USER>:~/sqlcipher/build# git clone https://github.com/sqlcipher/sqlcipher.git
sqlcipher
mkdir build && cd build
../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
sudo make install
Cloning into 'sqlcipher'...
fatal: the remote end hung up unexpectedly
root@<USER>:~/sqlcipher/build# cd sqlcipher
-bash: cd: sqlcipher: No such file or directory
root@<USER>:~/sqlcipher/build# mkdir build && cd build
root@<USER>:~/sqlcipher/build/build# ../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
-bash: ../configure: No such file or directory
root@<USER>:~/sqlcipher/build/build# sudo make install
make: *** No rule to make target 'install'. Stop.
Ran
cd ~
git clone https://github.com/carderne/signal-export.git
cd signal-export
pip install -r requirements.txt
Output:
root@<USER>:~/sqlcipher/build/build# cd ~
t clone root@<USER>:~# git clone https://github.com/carderne/signal-export.git
d signal-export
Cloning into 'signal-export'...
pip install -r requirements.txt
remote: Enumerating objects: 237, done.
remote: Counting objects: 100% (136/136), done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 237 (delta 75), reused 130 (delta 72), pack-reused 101
Receiving objects: 100% (237/237), 62.11 KiB | 691.00 KiB/s, done.
Resolving deltas: 100% (137/137), done.
root@<USER>:~# cd signal-export
root@<USER>:~/signal-export# pip install -r requirements.txt
Collecting beautifulsoup4
Downloading beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
|████████████████████████████████| 115 kB 1.6 MB/s
Requirement already satisfied: Click>=7.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 2)) (7.0)
Collecting Markdown>=3.0
Downloading Markdown-3.3.4-py3-none-any.whl (97 kB)
|████████████████████████████████| 97 kB 1.8 MB/s
Requirement already satisfied: pysqlcipher3>=1.0.3 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 4)) (1.0.4)
Collecting soupsieve>1.2; python_version >= "3.0"
Downloading soupsieve-2.2.1-py3-none-any.whl (33 kB)
Installing collected packages: soupsieve, beautifulsoup4, Markdown
Successfully installed Markdown-3.3.4 beautifulsoup4-4.9.3 soupsieve-2.2.1
Then I was automatically brought to signal-export so I tried running it
root@<USER>:~/signal-export# ./sigexport test_output
-bash: ./sigexport: No such file or directory
Then tried ./sigexport.py outputdir
in case it would work
root@<USER>:~/signal-export# ./sigexport.py outputdir
Error: /root/.config/Signal/config.json not found in directory /root/.config/Signal
@Harkens When you install pysqlcipher3 via pip(3) it shouldn't be necessary to make/compile it from source code anymore. When you don't have pip3, try with pip instead or install Python 3 before.
@PiWakeTV Sorry, can you clarify what you mean? Are you saying that I don't need to run sudo make install
or the following?
git clone https://github.com/sqlcipher/sqlcipher.git
cd sqlcipher
mkdir build && cd build
../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
sudo make install
I still can't run signal exporter and I have no idea why.
root@<USER>:~/signal-export# ./sigexport.py outputdir
Error: /root/.config/Signal/config.json not found in directory /root/.config/Signal
I do have config.json in C:\Users\<USER>\AppData\Roaming\Signal
so I am so lost about what I could be doing wrong.
Anyone experiencing this issue on Mac OS Monteray? I am doing this on the new M1/ARM macbook.
brew install openssl sqlcipher >> works fine
if i run it again, I am told: sqlcipher 4.5.0 is already installed and up-to-date.
but when i try to run sigexport i get:
File "/Users/sysop/miniconda3/lib/python3.8/site-packages/sigexport/main.py", line 14, in
COuld this be the fact that i am tyring to do this in a Condo environment? That usually seems to help, not hurt.
Tahanks
@vinnytroia you could try manually cloning this repo, install with pip install -e signal-export/
and/or manually pip/conda install pysqlcipher3
. And just see if you can it to import pysqlcipher3
at all, eg run in the terminal:
python -c "import pysqlcipher3"
But yes it seems like sqlcipher
and/or pysqlcipher3
are getting more and more difficult to play with...
@vinnytroia I have the same issue without Condo environment - and can't install pysqlcipher
with pip
- @carderne would it be possible to install a specific version? The requirements.txt
on the repo looks empty
The requirements are in setup.cfg
.
I was hoping the issue could be easily fixed by installing the minimum version (pip3 install -I pysqlcipher3==1.0.3
) but installing verbosely, I get the following error: src/python3/connection.h:33:10: fatal error: 'sqlcipher/sqlite3.h' file not found
Issues talk about installing libsqlcipher-dev, but not sure what would be the macOS equivalent? (Issue #1, Issue #2)
There is also an issue on sqlcipher3 about the installation not working on macOS (link)
PS: pysqlcipher3 is not actively maintained anymore
Would recommend you to try the new Docker instructions, which should bypass all the sqlcipher3 difficulties. Check the README.
I know this is an old thread but in case somebody tries to install SQLCipher plus python package on a M1 mac, this saved me (need to recompile and rebuild totally).
brew install sqlcipher
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
git clone https://github.com/sqlcipher/sqlcipher
cd sqlcipher/
./configure
make sqlite3.c
cd ..
git clone https://github.com/coleifer/sqlcipher3
cp sqlcipher/sqlite3.[ch] sqlcipher3/
cd sqlcipher3
python setup.py build_static build
Hi I am trying to install PySqlCipher3 on Windows10, however I am failing to do so.
Please could you help me with some guidance?