So I am trying to install Pyv8 by following instruction from https://andrewwilkinson.wordpress.com/2012/01/23/integrating-python-and-javascript-with-pyv8/
sudo aptitude install scons libboost-python-dev
svn checkout http://v8.googlecode.com/svn/trunk/ v8
svn checkout http://pyv8.googlecode.com/svn/trunk/ pyv8
cd v8
export PyV8=`pwd`
cd ../pyv8
python setup.py build
sudo python setup.py install
Error comes when running second last command about building the setup.
-Wstrict-prototypes -fPIC -DBOOST_PYTHON_STATIC_LIB -
DV8_NATIVE_REGEXP -DENABLE_DEBUGGER_SUPPORT -DV8_TARGET_ARCH_X64 -
I/home/amit/Downloads/pyv8/build/v8_r19632/include -
I/home/amit/Downloads/pyv8/build/v8_r19632 -
I/home/amit/Downloads/pyv8/build/v8_r19632/src -I/usr/local/include -
I/usr/include/python2.7 -c src/PyV8.cpp -o build/temp.linux-x86_64-
2.7/src/PyV8.o -Wno-write-strings -g -O3
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for
C/ObjC but not for C++ [enabled by default]
c++ -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/src/Utils.o build/temp.linux-x86_64-2.7/src/Exception.o
build/temp.linux-x86_64-2.7/src/Context.o build/temp.linux-x86_64-
2.7/src/Engine.o build/temp.linux-x86_64-2.7/src/Wrapper.o
build/temp.linux-x86_64-2.7/src/Debug.o build/temp.linux-x86_64-
2.7/src/Locker.o build/temp.linux-x86_64-2.7/src/AST.o build/temp.linux-
x86_64-2.7/src/PrettyPrinter.o build/temp.linux-x86_64-2.7/src/PyV8.o
L/usr/local/lib -
L/home/amit/Downloads/pyv8/build/v8_r19632/out/x64.release/obj.target/tool
s/gyp/ -lboost_python -lboost_thread -lboost_system -lrt -lv8_base.x64 -
lv8_snapshot -o build/lib.linux-x86_64-2.7/_PyV8.so -fPIC -lrt
/usr/bin/ld: cannot find -lboost_thread
/usr/bin/ld: cannot find -lboost_system
collect2: error: ld returned 1 exit status
error: command 'c++' failed with exit status 1
It is because the version of gcc and g++ is too low for me, as I downgrade it when i install cuda sometime. Just follow the following commands:
$ cd /usr/bin
$ rm gcc
$ ln -s gcc-5 gcc
$ rm g++
$ ln -s g++-5 g++
Done.
I followed the instructions from this link - http://ubuntuforums.org/showthread.php?t=1480282#post_11247864
and installed the libboost_thread package which solved the problem. Thank you https://stackoverflow.com/users/440558/joachim-pileborg
Related
While installing psycopg2 binary python package, am getting the below error
copg/typecast.c -o build/temp.linux-x86_64-3.7/psycopg/typecast.o -Wdeclaration-after-statement
gcc -pthread -shared -B /data/softwares/AnacondaPackages/anaconda3/compiler_compat -L/data/softwares/AnacondaPackages/anaconda3/lib -Wl,-rpath=/data/softwares/AnacondaPackages/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ -Wl,-O2,--sort-common,--as-needed,-z,relro,-z,now -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -D_FORTIFY_SOURCE=2 -O2 build/temp.linux-x86_64-3.7/psycopg/psycopgmodule.o build/temp.linux-x86_64-3.7/psycopg/green.o build/temp.linux-x86_64-3.7/psycopg/pqpath.o build/temp.linux-x86_64-3.7/psycopg/utils.o build/temp.linux-x86_64-3.7/psycopg/bytes_format.o build/temp.linux-x86_64-3.7/psycopg/libpq_support.o build/temp.linux-x86_64-3.7/psycopg/win32_support.o build/temp.linux-x86_64-3.7/psycopg/solaris_support.o build/temp.linux-x86_64-3.7/psycopg/connection_int.o build/temp.linux-x86_64-3.7/psycopg/connection_type.o build/temp.linux-x86_64-3.7/psycopg/cursor_int.o build/temp.linux-x86_64-3.7/psycopg/cursor_type.o build/temp.linux-x86_64-3.7/psycopg/replication_connection_type.o build/temp.linux-x86_64-3.7/psycopg/replication_cursor_type.o build/temp.linux-x86_64-3.7/psycopg/replication_message_type.o build/temp.linux-x86_64-3.7/psycopg/diagnostics_type.o build/temp.linux-x86_64-3.7/psycopg/error_type.o build/temp.linux-x86_64-3.7/psycopg/lobject_int.o build/temp.linux-x86_64-3.7/psycopg/lobject_type.o build/temp.linux-x86_64-3.7/psycopg/notify_type.o build/temp.linux-x86_64-3.7/psycopg/xid_type.o build/temp.linux-x86_64-3.7/psycopg/adapter_asis.o build/temp.linux-x86_64-3.7/psycopg/adapter_binary.o build/temp.linux-x86_64-3.7/psycopg/adapter_datetime.o build/temp.linux-x86_64-3.7/psycopg/adapter_list.o build/temp.linux-x86_64-3.7/psycopg/adapter_pboolean.o build/temp.linux-x86_64-3.7/psycopg/adapter_pdecimal.o build/temp.linux-x86_64-3.7/psycopg/adapter_pint.o build/temp.linux-x86_64-3.7/psycopg/adapter_pfloat.o build/temp.linux-x86_64-3.7/psycopg/adapter_qstring.o build/temp.linux-x86_64-3.7/psycopg/microprotocols.o build/temp.linux-x86_64-3.7/psycopg/microprotocols_proto.o build/temp.linux-x86_64-3.7/psycopg/typecast.o -L/usr/local/pgsql/lib -lpq -o build/lib.linux-x86_64-3.7/psycopg2/_psycopg.cpython-37m-x86_64-linux-gnu.so
gcc: error: unrecognized command line option ‘-fno-plt’
error: command 'gcc' failed with exit status 1
I found out it is using GCC w.r.t to OS but i want GCC of conda to be used for the installation.
pip install psycopg2-binary.tar.gz (Offline installation)
I am trying install mysqlclient-python in docker with Debian 8
but when I run python3 setup.py install
I get error:
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/_mysql.o -lmysqlclient -lpthread -lz -lm -ldl -lssl -lcrypto -o build/lib.linux-x86_64-3.4/_mysql.cpython-34m.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
I tryed install various packages (openssl, crypto++, libmysqlclient-dev, mysql-client,...) but nothing helped me..
Do you know what exactly I need?
If -lssl and -lcrypto are failing, you're likely missing the libssl headers
On debian-based systems you can install these with
apt-get install libssl-dev
Most likely you'll already have an apt line in your Dockerfile which installs libmysqlclient-dev, you'll simply add libssl-dev to the list of packages there.
I'm trying to install mysql-python module in ubuntu 12.04 under virtualenv environment but unexpectedly faced with error below:
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -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 -fPIC -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1
In file included from /usr/include/mysql/mysql.h:64:0,
from _mysql.c:46:
/usr/include/mysql/mysql/client_plugin.h:97:3: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
In file included from /usr/include/mysql/mysql.h:64:0,
from _mysql.c:46:
/usr/include/mysql/mysql/client_plugin.h:107:3: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
-Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib/x86_64-linux-gnu
-lmysqlclient_r -lpthread -lz -lm -lrt -ldl -o build/lib.linux-x86_64-2.7/_mysql.so
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
I've run:
sudo apt-get install mysql-server mysql-client python-mysqldb libmysqlclient-dev python-dev
but it didn't help.
The problem was that libmysqlclient.so didn't have symlinks described in https://github.com/javer/gentoo-overlay/issues/4#issuecomment-30748799
For me on Centos, the problem was that MySQL-python did not provide the libmysqlclient_r.so but it had the other numbered versions. By uninstalling it and installing Percona-SQL-devel instead, python was able to find the library and build wheel correctly.
I am trying to run a flask app on an apache server so I am using mod_wsgi to deploy it. I downloaded python 3.4 from source and compiled it and it runs just fine. Now I did this:
cd
wget http://modwsgi.googlecode.com/files/mod_wsgi-3.4.tar.gz
tar -zxf mod_wsgi-3.4.tar.gz
cd mod_wsgi-3.4
sudo ./configure --with-python=/usr/local/opt/python-3.4.1/bin/python3.4
make
But when I run make I get this error chain:
/usr/bin/apxs2 -c -I/usr/local/opt/python-3.4.1/include/python3.4m -DNDEBUG mod_wsgi.c -L/usr/local/opt/python-3.4.1/lib -L/usr/local/opt/python-3.4.1/lib/python3.4/config -lpython3.4 -lpthread -ldl -lutil -lm
Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1.
/usr/share/apr-1.0/build/libtool --silent --mode=compile --tag=disable-static x86_64-linux-gnu-gcc -prefer-pic -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I -I. -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -I/usr/local/opt/python-3.4.1/include/python3.4m -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
/usr/share/apr-1.0/build/libtool --silent --mode=link --tag=disable-static x86_64-linux-gnu-gcc -Wl,--as-needed -Wl,-z,relro -o mod_wsgi.la -rpath /usr/lib/apache2/modules -module -avoid-version mod_wsgi.lo -L/usr/local/opt/python-3.4.1/lib -L/usr/local/opt/python-3.4.1/lib/python3.4/config -lpython3.4 -lpthread -ldl -lutil -lm
/usr/bin/ld: cannot find -lpython3.4
collect2: error: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1
And I just don't know what to make of it. And ideas?
Terminal Error Return
root#sys:~/Downloads/PIL-fork-1.1.7-py3# python3 setup.py build
running build
running build_py
running build_ext
building 'PIL._imaging' extension
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -IlibImaging -I/usr/include -I/usr/local/include -I/usr/include/python3.2mu -c _imaging.c -o build/temp.linux-x86_64-3.2/_imaging.o
_imaging.c:75:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
root#sys:~/Downloads/PIL-fork-1.1.7-py3#
this file are downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil
how to install this Aspell PIL Python 3?
Following below step to complete install PIL
sudo aptitude install python3-setuptools
sudo easy_install3 pip
sudo apt-get install python3-dev
download the Pillow-master.zip
wget https://github.com/python-imaging/Pillow/archive/master.zip
go to downloaded directory and,
sudo unzip Pillow-master.zip
python3 setup.py build
python3 setup.py install