/usr/bin/ld: cannot find -lcrypto
-lcrypto
significa libcrypto.so
Solução:
sudo apt-get install libssl-dev
Estou tentando instalar o pybloomfiltermmap versão 0.3.14 via pip (está em uma máquina virtual ubuntu 16.04)
sudo pip install pybloomfiltermmap==0.3.14
Mas recebo um erro e não sei porque ou como corrigi-lo:
rptk99@ubuntu:~/w3af$ sudo pip install pybloomfiltermmap==0.3.14
The directory '/home/rptk99/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/rptk99/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pybloomfiltermmap==0.3.14
Downloading pybloomfiltermmap-0.3.14.tar.gz (446kB)
100% |████████████████████████████████| 450kB 313kB/s
Installing collected packages: pybloomfiltermmap
Running setup.py install for pybloomfiltermmap ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-VUo2JI/pybloomfiltermmap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-uyHOdy-record/install-record.txt --single-version-externally-managed --compile:
info: Building from C
running install
running build
running build_ext
building 'pybloomfilter' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/mmapbitarray.c -o build/temp.linux-x86_64-2.7/src/mmapbitarray.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/bloomfilter.c -o build/temp.linux-x86_64-2.7/src/bloomfilter.o
src/bloomfilter.c:11:14: warning: always_inline function might not be inlinable [-Wattributes]
BloomFilter *bloomfilter_Create_Malloc(size_t max_num_elem, double error_rate,
^
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/md5.c -o build/temp.linux-x86_64-2.7/src/md5.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/primetester.c -o build/temp.linux-x86_64-2.7/src/primetester.o
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/MurmurHash3.cpp -o build/temp.linux-x86_64-2.7/src/MurmurHash3.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/pybloomfilter.c -o build/temp.linux-x86_64-2.7/src/pybloomfilter.o
In file included from src/pybloomfilter.c:348:0:
/usr/include/python2.7/pythread.h:5:1: warning: ‘always_inline’ attribute ignored [-Wattributes]
typedef void *PyThread_type_lock;
^
src/pybloomfilter.c:828:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
__PYX_EXTERN_C DL_IMPORT(int) errno;
^
creating build/lib.linux-x86_64-2.7
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/mmapbitarray.o build/temp.linux-x86_64-2.7/src/bloomfilter.o build/temp.linux-x86_64-2.7/src/md5.o build/temp.linux-x86_64-2.7/src/primetester.o build/temp.linux-x86_64-2.7/src/MurmurHash3.o build/temp.linux-x86_64-2.7/src/pybloomfilter.o -lcrypto -o build/lib.linux-x86_64-2.7/pybloomfilter.so
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
error: command 'c++' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-VUo2JI/pybloomfiltermmap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-uyHOdy-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-VUo2JI/pybloomfiltermmap/
rptk99@ubuntu:~/w3af$
Como corrijo este problema?
/usr/bin/ld: cannot find -lcrypto
-lcrypto
significa libcrypto.so
Solução:
sudo apt-get install libssl-dev
Instale o pybloomfiltermmap 0.3.14-0.1 usando este pacote .deb
no Launchpad .
ou
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
pip install pybloomfiltermmap