I am trying to install pydeep via pip install pydeep on a CentOS 64b, but i get this:
error: command 'gcc' failed with exit status 1. Tried to install gcc and many others like python-dev, etc. but still no result. I also cloned it from GitHub and tried to:
python setup.py build but I get the same problem (note that I already have libssdeep).
Downloading/unpacking pydeep
Running setup.py egg_info for package pydeep
Installing collected packages: pydeep
Running setup.py install for pydeep
building 'pydeep' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c pydeep.c -o build/temp.linux-x86_64-2.6/pydeep.o
pydeep.c:2:19: error: fuzzy.h: No such file or directory
pydeep.c: In function ‘pydeep_hash_file’:
pydeep.c:33: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)
pydeep.c:33: error: (Each undeclared identifier is reported only once
pydeep.c:33: error: for each function it appears in.)
pydeep.c:38: warning: implicit declaration of function ‘fuzzy_hash_file’
pydeep.c: In function ‘pydeep_hash_buf’:
pydeep.c:64: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)
pydeep.c:72: warning: implicit declaration of function ‘fuzzy_hash_buf’
pydeep.c: In function ‘pydeep_compare’:
pydeep.c:90: warning: implicit declaration of function ‘fuzzy_compare’
error: command 'gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-bogdan/pydeep/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EQweL1-record/install-record.txt --single-version-externally-managed:
running install
running build
running build_ext
building 'pydeep' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c pydeep.c -o build/temp.linux-x86_64-2.6/pydeep.o
pydeep.c:2:19: error: fuzzy.h: No such file or directory
pydeep.c: In function ‘pydeep_hash_file’:
pydeep.c:33: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)
pydeep.c:33: error: (Each undeclared identifier is reported only once
pydeep.c:33: error: for each function it appears in.)
pydeep.c:38: warning: implicit declaration of function ‘fuzzy_hash_file’
pydeep.c: In function ‘pydeep_hash_buf’:
pydeep.c:64: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)
pydeep.c:72: warning: implicit declaration of function ‘fuzzy_hash_buf’
pydeep.c: In function ‘pydeep_compare’:
pydeep.c:90: warning: implicit declaration of function ‘fuzzy_compare’
error: command 'gcc' failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-bogdan/pydeep/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EQweL1-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-bogdan/pydeep
Storing complete log in /root/.pip/pip.log
If you need the full log or some specific info, I`ll provide it ASAP.
Thanks in advance!
For anyone else stumbling on this, running the following fixed the pydeep compile problems for me in Ubuntu:
sudo apt-get install python-dev libfuzzy-dev
pydeep's setup.py needs to be run as root
Related
I want to install package devtools. But after successful downloading of all dependencies, it gives error while installing of the form:
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c rawmatch.c -o rawmatch.o
gcc: error: unrecognized command line option ‘-fstack-protector-strong’
gcc: error: unrecognized command line option ‘-Wdate-time’
/usr/lib/R/etc/Makeconf:159: recipe for target 'rawmatch.o' failed
make: *** [rawmatch.o] Error 1
ERROR: compilation failed for package ‘mime’
* removing ‘/usr/local/lib/R/site-library/mime’
I have checked gcc. I am able to run a sample c program file from terminal.
It seems you'll need to use a more recent gcc version, 4.9 at least.
Both unrecognized options, -fstack-protector-strong and -Wdate-time, were introduced in gcc 4.9 (release notes).
I am trying to install mitproxy on my EC2 linux instance using pip:
sudo pip install mitmproxy
I have python2.7 installed, and now 2 instances of libffi
$ rpm -qa | grep libff
libffi-3.0.13-11.4.amzn1.x86_64
libffi-devel-3.0.13-11.4.amzn1.x86_64
but each time I try to run the install command I get the following error message:
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c:423:30: fatal error: openssl/opensslv.h: No such file or directory
#include <openssl/opensslv.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Any thoughts where I'm going wrong?
Just solved the problem with following solution:
wget source code gzip package from https://www.openssl.org/source/
config&&make&&make install
Good luck!
I'm struggling to install the mysql-python pip either systemwide or in a venv on Ubuntu 14.04 with MariaDB 10 installed. Also tried with MariaDB 5.5 and getting the same error. I don't have this issue with vanilla mysql-server installed.
I have the following installed via apt-get:
build-essential
python-dev
libmariadbclient-dev (thats the MariaDB replacement for libmysqlclient-dev)
python-mysqldb
Originally I thought this was an issue installing this into a venv but I've subsequently noticed mysql-python won't install systemwide either. Below are the cmds I used to install in a venv.
virtualenv venv
. venv/bin/activate
pip install mysql-python==1.2.5
In file included from _mysql.c:44:0:
/usr/include/mysql/my_config.h:439:0: warning: "HAVE_WCSCOLL" redefined [enabled by default]
#define HAVE_WCSCOLL
^
In file included from /usr/include/python2.7/pyconfig.h:3:0,
from /usr/include/python2.7/Python.h:8,
from _mysql.c:29:
/usr/include/x86_64-linux-gnu/python2.7/pyconfig.h:911:0: note: this is the location of the previous definition
#define HAVE_WCSCOLL 1
^x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib/x86_64-linux-gnu -lmariadbclient_r -lpthread -lz -lm -lssl -lcrypto -ldl -o build/lib.linux-x86_64-2.7/_mysql.so
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /root/env/bin/python -c "import setuptools, tokenize;__file__='/root/env/build/mysql- python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EyhO2v-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/env/include/site/python2.7 failed with error code 1 in /root/env/build/mysql-python
Storing debug log for failure in /root/.pip/pip.log
You need to have installed the development libraries of OpenSSL. It can be a libssl-dev, libssl-devel if your distribution provides separated packages for the dev libraries. Or install the complete openssl package if they don't.
(venv)➜ src pip install mysql-python==1.2.5
Downloading/unpacking mysql-python==1.2.5
Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
Running setup.py (path:/home/braiam/src/venv/build/mysql-python/setup.py) egg_info for package mysql-python
Installing collected packages: mysql-python
Running setup.py install for mysql-python
building '_mysql' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -DBIG_JOINS=1 -fno-strict-aliasing -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
In file included from _mysql.c:44:0:
/usr/include/mysql/my_config.h:439:0: warning: "HAVE_WCSCOLL" redefined
#define HAVE_WCSCOLL
^
In file included from /usr/include/python2.7/pyconfig.h:3:0,
from /usr/include/python2.7/Python.h:8,
from _mysql.c:29:
/usr/include/x86_64-linux-gnu/python2.7/pyconfig.h:911:0: note: this is the location of the previous definition
#define HAVE_WCSCOLL 1
^
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib/x86_64-linux-gnu -lmariadbclient_r -lpthread -lz -lm -lssl -lcrypto -ldl -o build/lib.linux-x86_64-2.7/_mysql.so
Successfully installed mysql-python
Cleaning up...
But, there were two messages that you have that I didn't, namely:
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
Which if you did ld -lcrypto --verbose or ld -lssl --verbose wouldn't produce this results:
➜ src ld -lcrypto --verbose | grep succeeded
attempt to open //usr/lib/x86_64-linux-gnu/libcrypto.so succeeded
ld: warning: cannot find entry symbol _start; not setting start address
➜ src ld -lssl --verbose | grep succeeded
attempt to open //usr/lib/x86_64-linux-gnu/libssl.so succeeded
ld: warning: cannot find entry symbol _start; not setting start address
So, to fix this just make sure you have installed the libssl-dev package which provides both libraries.
I meet the similar error on MacOS but there is no "/usr/bin/ld: cannot find -lssl" for me.
Solved with the following steps:
Step 1. Make sure you have installed openssl with homebrew.
brew install openssl
Step 2. In a terminal:
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
For Linux you can also try yum install your missing library and add them to LIBRARY_PATH.
For Debian 9.x:
apt install libssl-dev
For CentOS:
sudo yum install openssl-devel
I'm trying to upgrade Pillow on my Mac. When I run sudo pip install Pillow I get
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./lib/python2.7/site-packages/Pillow-2.3.0-py2.7-macosx-10.8-intel.egg
I run sudo pip install --upgrade Pillow and I get the following error:
copying PIL/OleFileIO-README.md -> build/lib.macosx-10.9-intel-2.7/PIL
running build_ext
--- using frameworks at /System/Library/Frameworks
building 'PIL._imaging' extension
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/libImaging
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/opt/local/include/freetype2 -I/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/build/Pillow/libImaging -I/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/include -I/opt/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.9-intel-2.7/_imaging.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
----------------------------------------
Rolling back uninstall of Pillow
Cleaning up...
Exception:
Traceback (most recent call last):
File "/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/lib/python2.7/site-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/lib/python2.7/site-packages/pip/req.py", line 1439, in install
requirement.rollback_uninstall()
File "/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/lib/python2.7/site-packages/pip/req.py", line 603, in rollback_uninstall
self.uninstalled.rollback()
File "/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/lib/python2.7/site-packages/pip/req.py", line 1855, in rollback
pth.rollback()
AttributeError: 'str' object has no attribute 'rollback'
Does anyone know how to fix this? Thanks.
This worked for me:
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install --upgrade pillow
I am trying to install Kyoto Cabinet via ruby gems. I am putting inside the Gemfile
gem "kyotocabinet", "~> 1.0"
as opposed here
but when I run bundle it fails with
setting variables ...
$CFLAGS = -I. -I/usr/local/include -Wall $(cflags) -fPIC -O2
$LDFLAGS = -L. -rdynamic -Wl,-export-dynamic -L. -L/usr/local/lib
$libs = -lkyotocabinet -lz -lstdc++ -lrt -lpthread -lm -lc
checking for kccommon.h... yes
creating Makefile
make
g++ -I. -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/x86_64-linux -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/ruby/backward -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1 -I. -DHAVE_KCCOMMON_H -fPIC -I. -I/usr/local/include -Wall -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -O2 -o kyotocabinet.o -c kyotocabinet.cc
kyotocabinet.cc:29: error: ‘INT32_MAX’ was not declared in this scope
kyotocabinet.cc:30: error: ‘INT32_MAX’ was not declared in this scope
kyotocabinet.cc:61: warning: type qualifiers ignored on function return type
kyotocabinet.cc:320: warning: type qualifiers ignored on function return type
kyotocabinet.cc: In function ‘void init_err()’:
kyotocabinet.cc:387: error: ‘NOFILE’ is not a member of ‘kyotocabinet::BasicDB::Error’
kyotocabinet.cc: In function ‘VALUE db_increment(int, VALUE*, VALUE)’:
kyotocabinet.cc:1009: error: ‘INT64_MIN’ was not declared in this scope
kyotocabinet.cc: In function ‘VALUE db_synchronize(int, VALUE*, VALUE)’:
kyotocabinet.cc:1094: error: cannot declare variable ‘proc’ to be of abstract type ‘SoftFileProcessor’
kyotocabinet.cc:288: note: because the following virtual functions are pure within ‘SoftFileProcessor’:
/usr/local/include/kcdb.h:1070: note: virtual bool
kyotocabinet::BasicDB::FileProcessor::process(const std::string&, int64_t, int64_t)
make: *** [kyotocabinet.o] Error 1
If anyone knows a way to bypass this error please help! I am using Ubuntu 10.10 FYI.
Thanks a lot for any help!
Try using the gem "kyotocabinet-ruby" instead.
You need to install the libkyotocabinet-dev package:
sudo apt-get install libkyotocabinet-dev
And then you can use kyotocabinet-ruby:
sudo gem install kyotocabinet-ruby